1 # ltmain.sh - Provide generalized library-building support services.
2 # NOTE: Changing this file will not affect anything until you rerun ltconfig.
4 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
5 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
26 # Check that we have a working $echo.
27 if test "X$1" = X--no-reexec
; then
28 # Discard the --no-reexec flag, and continue.
30 elif test "X$1" = X--fallback-echo
; then
31 # used as fallback echo
37 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
38 # Yippee, $echo works!
41 # Restart under the correct shell, and then maybe $echo will work.
42 exec $SHELL "$0" --no-reexec ${1+"$@"}
45 # The name of this program.
46 progname
=`$echo "$0" | sed 's%^.*/%%'`
53 TIMESTAMP
=" (1.33 1999/04/26 16:28:53)"
56 help="Try \`$progname --help' for more information."
57 magic
="%%%MAGIC variable%%%"
62 # Sed substitution that helps us do robust quoting. It backslashifies
63 # metacharacters that are still active within double-quoted strings.
65 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
70 # Only set LANG and LC_ALL to C if already set.
71 # These must not be set unconditionally because not all systems understand
72 # e.g. LANG=C (notably SCO).
73 # We save the old values to restore during execute mode.
74 if test "${LC_ALL+set}" = set; then
75 save_LC_ALL
="$LC_ALL"; LC_ALL
=C
; export LC_ALL
77 if test "${LANG+set}" = set; then
78 save_LANG
="$LANG"; LANG
=C
; export LANG
81 if test "$LTCONFIG_VERSION" != "$VERSION"; then
82 echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
83 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
87 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
88 echo "$modename: not configured to build any kind of library" 1>&2
89 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
102 lo2o
="s/\\.lo\$/.${objext}/"
104 # Parse our command line options once, thoroughly.
111 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
115 # If the previous option needs an argument, assign it.
116 if test -n "$prev"; then
119 eval "$prev=\"\$$prev \$arg\""
131 # Have we seen a non-optional argument yet?
138 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
143 sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
148 echo "$progname: enabling shell trace mode"
158 if test "$build_libtool_libs" = yes; then
159 echo "enable shared libraries"
161 echo "disable shared libraries"
163 if test "$build_old_libs" = yes; then
164 echo "enable static libraries"
166 echo "disable static libraries"
171 --finish) mode
="finish" ;;
173 --mode) prevopt
="--mode" prev
=mode
;;
174 --mode=*) mode
="$optarg" ;;
186 $echo "$modename: unrecognized option \`$arg'" 1>&2
198 if test -n "$prevopt"; then
199 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
204 if test -z "$show_help"; then
206 # Infer the operation mode.
207 if test -z "$mode"; then
209 *cc |
*++ | gcc
* |
*-gcc*)
221 *db |
*dbx |
*strace |
*truss
)
231 # If we have no mode, but dlfiles were specified, then do execute mode.
232 test -n "$execute_dlfiles" && mode
=execute
234 # Just use the default operation mode.
235 if test -z "$mode"; then
236 if test -n "$nonopt"; then
237 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
239 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
246 # Only execute mode is allowed to have -dlopen flags.
247 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
248 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
253 # Change the help message to a mode-specific one.
255 help="Try \`$modename --help --mode=$mode' for more information."
257 # These modes are in order of execution frequency so that they run quickly.
259 # libtool compile mode
261 modename
="$modename: compile"
262 # Get the compilation command and the source file.
271 # Accept any command-line options.
274 if test "$user_target" != "no"; then
275 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
287 case "$user_target" in
289 # The next one is the -o target name
294 # We got the output file
301 # Accept the current argument as the source file.
305 # Aesthetically quote the previous argument.
307 # Backslashify any backslashes, double quotes, and dollar signs.
308 # These are the only characters that are still specially
309 # interpreted inside of double-quoted scrings.
310 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
312 # Double-quote args containing other shell metacharacters.
313 # Many Bourne shells cannot handle close brackets correctly in scan
314 # sets, so we specify it separately.
316 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
317 lastarg
="\"$lastarg\""
321 # Add the previous argument to base_compile.
322 if test -z "$base_compile"; then
323 base_compile
="$lastarg"
325 base_compile
="$base_compile $lastarg"
329 case "$user_target" in
333 # Get the name of the library object.
334 libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
337 $echo "$modename: you must specify a target with \`-o'" 1>&2
342 # Recognize several different file suffixes.
343 # If the user specifies -o file.o, it is replaced with file.lo
358 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
361 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
363 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
368 if test -z "$base_compile"; then
369 $echo "$modename: you must specify a compilation command" 1>&2
374 # Delete any leftover library objects.
375 if test "$build_old_libs" = yes; then
376 removelist
="$obj $libobj"
382 trap "$run $rm $removelist; exit 1" 1 2 15
384 # Calculate the filename of the output object if compiler does
385 # not support -o with -c
386 if test "$compiler_c_o" = no
; then
387 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.
${objext}
388 lockfile
="$output_obj.lock"
389 removelist
="$removelist $output_obj $lockfile"
390 trap "$run $rm $removelist; exit 1" 1 2 15
396 # Lock this critical section if it is needed
397 # We use this script file to make the link, it avoids creating a new file
398 if test "$need_locks" = yes; then
399 until ln "$0" "$lockfile" 2>/dev
/null
; do
400 $show "Waiting for $lockfile to be removed"
403 elif test "$need_locks" = warn
; then
404 if test -f "$lockfile"; then
406 *** ERROR, $lockfile exists and contains:
407 `cat $lockfile 2>/dev/null`
409 This indicates that another process is trying to use the same
410 temporary object file, and libtool could not work around it because
411 your compiler does not support \`-c' and \`-o' together. If you
412 repeat this compilation, it may succeed, by chance, but you had better
413 avoid parallel builds (make -j) in this platform, or get a better
419 echo $srcfile > "$lockfile"
422 if test -n "$fix_srcfile_path"; then
423 eval srcfile
=\"$fix_srcfile_path\"
426 # Only build a PIC object if we are building libtool libraries.
427 if test "$build_libtool_libs" = yes; then
428 # Without this assignment, base_compile gets emptied.
429 fbsd_hideous_sh_bug
=$base_compile
431 # All platforms use -DPIC, to notify preprocessed assembler code.
432 command="$base_compile $pic_flag -DPIC $srcfile"
433 if test "$build_old_libs" = yes; then
435 dir
=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
436 if test "X$dir" = "X$libobj"; then
441 libobj
="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
443 if test -d "$dir"; then
450 if test $status -ne 0 && test ! -d $dir; then
455 if test "$compiler_o_lo" = yes; then
457 command="$command -o $output_obj"
458 elif test "$compiler_c_o" = yes; then
460 command="$command -o $output_obj"
464 if $run eval "$command"; then :
466 test -n "$output_obj" && $run $rm $removelist
470 if test "$need_locks" = warn
&&
471 test x
"`cat $lockfile 2>/dev/null`" != x
"$srcfile"; then
473 *** ERROR, $lockfile contains:
474 `cat $lockfile 2>/dev/null`
476 but it should contain:
479 This indicates that another process is trying to use the same
480 temporary object file, and libtool could not work around it because
481 your compiler does not support \`-c' and \`-o' together. If you
482 repeat this compilation, it may succeed, by chance, but you had better
483 avoid parallel builds (make -j) in this platform, or get a better
490 # Just move the object if needed, then go on to compile the next one
491 if test x
"$output_obj" != x
"$libobj"; then
492 $show "$mv $output_obj $libobj"
493 if $run $mv $output_obj $libobj; then :
501 # If we have no pic_flag, then copy the object into place and finish.
502 if test -z "$pic_flag" && test "$build_old_libs" = yes; then
503 # Rename the .lo from within objdir to obj
504 if test -f $obj; then
509 $show "$mv $libobj $obj"
510 if $run $mv $libobj $obj; then :
517 # Now arrange that obj and lo_libobj become the same file
518 $show "$LN_S $obj $lo_libobj"
519 if $run $LN_S $obj $lo_libobj; then
528 # Allow error messages only from the first compilation.
529 suppress_output
=' >/dev/null 2>&1'
532 # Only build a position-dependent object if we build old libraries.
533 if test "$build_old_libs" = yes; then
534 command="$base_compile $srcfile"
535 if test "$compiler_c_o" = yes; then
536 command="$command -o $obj"
540 # Suppress compiler output if we already did a PIC compilation.
541 command="$command$suppress_output"
543 if $run eval "$command"; then :
549 if test "$need_locks" = warn
&&
550 test x
"`cat $lockfile 2>/dev/null`" != x
"$srcfile"; then
552 *** ERROR, $lockfile contains:
553 `cat $lockfile 2>/dev/null`
555 but it should contain:
558 This indicates that another process is trying to use the same
559 temporary object file, and libtool could not work around it because
560 your compiler does not support \`-c' and \`-o' together. If you
561 repeat this compilation, it may succeed, by chance, but you had better
562 avoid parallel builds (make -j) in this platform, or get a better
569 # Just move the object if needed
570 if test x
"$output_obj" != x
"$obj"; then
571 $show "$mv $output_obj $obj"
572 if $run $mv $output_obj $obj; then :
580 # Create an invalid libtool object if no PIC, so that we do not
581 # accidentally link it into a program.
582 if test "$build_libtool_libs" != yes; then
583 $show "echo timestamp > $libobj"
584 $run eval "echo timestamp > \$libobj" ||
exit $?
586 # Move the .lo from within objdir
587 $show "$mv $libobj $lo_libobj"
588 if $run $mv $libobj $lo_libobj; then :
597 # Unlock the critical section if it was locked
598 if test "$need_locks" != no
; then
607 modename
="$modename: link"
608 C_compiler
="$CC" # save it, to compile generated C sources
609 # CYGNUS LOCAL: tromey/java
610 # Always respect the CC configured in by ltconfig.
614 *-*-cygwin* |
*-*-mingw* |
*-*-os2*)
615 # It is impossible to link a dll without this setting, and
616 # we shouldn't force the makefile maintainer to figure out
617 # which system we are compiling for in order to pass an extra
618 # flag for every libtool invokation.
621 # FIXME: Unfortunately, there are problems with the above when trying
622 # to make a dll which has undefined symbols, in which case not
623 # even a static library is built. For now, we need to specify
624 # -no-undefined on the libtool link line when we can be certain
625 # that all symbols are satisfied, otherwise we get a static library.
628 # This is a source program that is used to create dlls on Windows
629 # Don't remove nor modify the starting and closing comments
630 # /* ltdll.c starts here */
631 # #define WIN32_LEAN_AND_MEAN
632 # #include <windows.h>
633 # #undef WIN32_LEAN_AND_MEAN
636 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
638 # #include <cygwin/cygwin_dll.h>
639 # DECLARE_CYGWIN_DLL( DllMain );
640 # HINSTANCE __hDllInstance_base;
643 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
645 # __hDllInstance_base = hInst;
648 # /* ltdll.c ends here */
649 # This is a source program that is used to create import libraries
650 # on Windows for dlls which lack them. Don't remove nor modify the
651 # starting and closing comments
652 # /* impgen.c starts here */
653 # /* Copyright (C) 1999 Free Software Foundation, Inc.
655 # This file is part of GNU libtool.
657 # This program is free software; you can redistribute it and/or modify
658 # it under the terms of the GNU General Public License as published by
659 # the Free Software Foundation; either version 2 of the License, or
660 # (at your option) any later version.
662 # This program is distributed in the hope that it will be useful,
663 # but WITHOUT ANY WARRANTY; without even the implied warranty of
664 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
665 # GNU General Public License for more details.
667 # You should have received a copy of the GNU General Public License
668 # along with this program; if not, write to the Free Software
669 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
672 # #include <stdio.h> /* for printf() */
673 # #include <unistd.h> /* for open(), lseek(), read() */
674 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
675 # #include <string.h> /* for strdup() */
677 # static unsigned int
678 # pe_get16 (fd, offset)
682 # unsigned char b[2];
683 # lseek (fd, offset, SEEK_SET);
685 # return b[0] + (b[1]<<8);
688 # static unsigned int
689 # pe_get32 (fd, offset)
693 # unsigned char b[4];
694 # lseek (fd, offset, SEEK_SET);
696 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
699 # static unsigned int
703 # unsigned char *b = ptr;
704 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
713 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
714 # unsigned long export_rva, export_size, nsections, secptr, expptr;
715 # unsigned long name_rvas, nexp;
716 # unsigned char *expdata, *erva;
717 # char *filename, *dll_name;
719 # filename = argv[1];
721 # dll = open(filename, O_RDONLY|O_BINARY);
725 # dll_name = filename;
727 # for (i=0; filename[i]; i++)
728 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
729 # dll_name = filename + i +1;
731 # pe_header_offset = pe_get32 (dll, 0x3c);
732 # opthdr_ofs = pe_header_offset + 4 + 20;
733 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
735 # if (num_entries < 1) /* no exports */
738 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
739 # export_size = pe_get32 (dll, opthdr_ofs + 100);
740 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
741 # secptr = (pe_header_offset + 4 + 20 +
742 # pe_get16 (dll, pe_header_offset + 4 + 16));
745 # for (i = 0; i < nsections; i++)
748 # unsigned long secptr1 = secptr + 40 * i;
749 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
750 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
751 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
752 # lseek(dll, secptr1, SEEK_SET);
753 # read(dll, sname, 8);
754 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
756 # expptr = fptr + (export_rva - vaddr);
757 # if (export_rva + export_size > vaddr + vsize)
758 # export_size = vsize - (export_rva - vaddr);
763 # expdata = (unsigned char*)malloc(export_size);
764 # lseek (dll, expptr, SEEK_SET);
765 # read (dll, expdata, export_size);
766 # erva = expdata - export_rva;
768 # nexp = pe_as32 (expdata+24);
769 # name_rvas = pe_as32 (expdata+32);
771 # printf ("EXPORTS\n");
772 # for (i = 0; i<nexp; i++)
774 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
775 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
780 # /* impgen.c ends here */
786 compile_command
="$CC"
787 finalize_command
="$CC"
798 if test -n "$shlibpath_var"; then
799 # get the directories listed in $shlibpath_var
800 eval lib_search_path
=\
`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
804 # now prepend the system-specific ones
805 eval lib_search_path
=\"$sys_lib_search_path_spec\
$lib_search_path\"
806 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
814 export_symbols_regex
=
817 link_against_libtool_libs
=
832 # We need to know -static, to get the right output filenames.
836 -all-static |
-static)
837 if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
838 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
840 build_libtool_libs
=no
847 # See if our shared archives depend on static archives.
848 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
850 # Go through the arguments, transforming them on the way.
851 while test $# -gt 0; do
855 # If the previous option needs an argument, assign it.
856 if test -n "$prev"; then
859 compile_command
="$compile_command @OUTPUT@"
860 finalize_command
="$finalize_command @OUTPUT@"
866 if test "$preload" = no
; then
867 # Add the symbol object into the linking commands.
868 compile_command
="$compile_command @SYMFILE@"
869 finalize_command
="$finalize_command @SYMFILE@"
873 *.la |
*.lo
) ;; # We handle these cases below.
875 if test "$prev" = dlprefiles
; then
877 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
884 dlprefiles
="$dlprefiles $arg"
885 test "$prev" = dlfiles
&& dlfiles
="$dlfiles $arg"
891 export_symbols
="$arg"
892 if test ! -f "$arg"; then
893 $echo "$modename: symbol file \`$arg' does not exist"
900 export_symbols_regex
="$arg"
915 xrpath
="$xrpath $arg"
920 eval "$prev=\"\$arg\""
931 if test -n "$link_static_flag"; then
932 compile_command
="$compile_command $link_static_flag"
933 finalize_command
="$finalize_command $link_static_flag"
934 dlopen_self
=$dlopen_self_static
940 # FIXME: remove this flag sometime in the future.
941 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
961 if test "$export_dynamic" != yes; then
963 if test -n "$export_dynamic_flag_spec"; then
964 eval arg
=\"$export_dynamic_flag_spec\"
971 -export-symbols |
-export-symbols-regex)
972 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
973 $echo "$modename: cannot have more than one -exported-symbols"
976 if test "$arg" = "-export-symbols"; then
985 dir
=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
987 /* |
[A-Za-z
]:[/\\]*)
988 # Add the corresponding hardcode_libdir_flag, if it is not identical.
991 $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
997 *) deplibs
="$deplibs $arg";;
999 case " $lib_search_path " in
1001 *) lib_search_path
="$lib_search_path $dir";;
1004 *-*-cygwin* |
*-*-mingw* |
*-*-os2*)
1005 dllsearchdir
=`cd "$dir" && pwd || echo "$dir"`
1006 case ":$dllsearchpath:" in
1007 ::) dllsearchpath
="$dllsearchdir";;
1008 *":$dllsearchdir:"*) ;;
1009 *) dllsearchpath
="$dllsearchpath:$dllsearchdir";;
1016 deplibs
="$deplibs $arg"
1020 if test "$module" != yes; then
1022 if test -n "$export_dynamic_flag_spec"; then
1023 eval arg
=\"$export_dynamic_flag_spec\"
1053 xrpath
="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'`
1058 # If we have no pic_flag, then this is the same as -all-static.
1059 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1060 compile_command
="$compile_command $link_static_flag"
1061 finalize_command
="$finalize_command $link_static_flag"
1062 dlopen_self
=$dlopen_self_static
1077 # Some other compiler flag.
1079 # Unknown arguments in both finalize_command and compile_command need
1080 # to be aesthetically quoted because they are evaled later.
1081 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1083 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1089 *.o |
*.obj |
*.a |
*.lib
)
1090 # A standard object.
1096 if test "$prev" = dlfiles
; then
1097 dlfiles
="$dlfiles $arg"
1098 if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
1102 # If libtool objects are unsupported, then we need to preload.
1107 if test "$prev" = dlprefiles
; then
1108 # Preload the old-style object.
1109 dlprefiles
="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1112 libobjs
="$libobjs $arg"
1116 # A libtool-controlled library.
1123 # Check to see that this really is a libtool archive.
1124 if (sed -e '2q' $arg |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
1126 $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
1130 # If the library was installed with an old release of libtool,
1131 # it will not redefine variable installed.
1134 # If there is no directory component, then add one.
1136 */* |
*\\*) .
$arg ;;
1140 # Get the name of the library we link against.
1142 for l
in $old_library $library_names; do
1146 if test -z "$linklib"; then
1147 $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
1151 # Find the relevant object directory and library name.
1152 name
=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
1154 if test "X$installed" = Xyes
; then
1157 dir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1158 if test "X$dir" = "X$arg"; then
1165 if test -n "$dependency_libs"; then
1166 # Extract -R from dependency_libs
1168 for deplib
in $dependency_libs; do
1170 -R*) temp_xrpath
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1171 case " $rpath $xrpath " in
1172 *" $temp_xrpath "*) ;;
1173 *) xrpath
="$xrpath $temp_xrpath";;
1175 -L*) case "$compile_command $temp_deplibs " in
1177 *) temp_deplibs
="$temp_deplibs $deplib";;
1179 *) temp_deplibs
="$temp_deplibs $deplib";;
1182 dependency_libs
="$temp_deplibs"
1185 if test -z "$libdir"; then
1186 # It is a libtool convenience library, so add in its objects.
1187 convenience
="$convenience $dir/$old_library"
1188 old_convenience
="$old_convenience $dir/$old_library"
1189 deplibs
="$deplibs$dependency_libs"
1190 compile_command
="$compile_command $dir/$old_library$dependency_libs"
1191 finalize_command
="$finalize_command $dir/$old_library$dependency_libs"
1195 # This library was specified with -dlopen.
1196 if test "$prev" = dlfiles
; then
1197 dlfiles
="$dlfiles $arg"
1198 if test -z "$dlname" ||
test "$dlopen" != yes ||
test "$build_libtool_libs" = no
; then
1199 # If there is no dlname, no dlopen support or we're linking statically,
1200 # we need to preload.
1203 # We should not create a dependency on this library, but we
1204 # may need any libraries it requires.
1205 compile_command
="$compile_command$dependency_libs"
1206 finalize_command
="$finalize_command$dependency_libs"
1212 # The library was specified with -dlpreopen.
1213 if test "$prev" = dlprefiles
; then
1214 # Prefer using a static library (so that no silly _DYNAMIC symbols
1215 # are required to link).
1216 if test -n "$old_library"; then
1217 dlprefiles
="$dlprefiles $dir/$old_library"
1219 dlprefiles
="$dlprefiles $dir/$linklib"
1224 if test "$build_libtool_libs" = yes && test -n "$library_names"; then
1225 link_against_libtool_libs
="$link_against_libtool_libs $arg"
1226 if test -n "$shlibpath_var"; then
1227 # Make sure the rpath contains only unique directories.
1228 case "$temp_rpath " in
1230 *) temp_rpath
="$temp_rpath $dir" ;;
1234 # We need an absolute path.
1236 /* |
[A-Za-z
]:[/\\]*) absdir
="$dir" ;;
1238 absdir
=`cd "$dir" && pwd`
1239 if test -z "$absdir"; then
1240 $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
1246 # This is the magic to use -rpath.
1247 # Skip directories that are in the system default run-time
1248 # search path, unless they have been requested with -R.
1249 case " $sys_lib_dlsearch_path " in
1252 case "$compile_rpath " in
1254 *) compile_rpath
="$compile_rpath $absdir"
1259 case " $sys_lib_dlsearch_path " in
1262 case "$finalize_rpath " in
1264 *) finalize_rpath
="$finalize_rpath $libdir"
1270 case "$hardcode_action" in
1271 immediate | unsupported
)
1272 if test "$hardcode_direct" = no
; then
1273 compile_command
="$compile_command $dir/$linklib"
1274 deplibs
="$deplibs $dir/$linklib"
1276 *-*-cygwin* |
*-*-mingw* |
*-*-os2*)
1277 dllsearchdir
=`cd "$dir" && pwd || echo "$dir"`
1278 if test -n "$dllsearchpath"; then
1279 dllsearchpath
="$dllsearchpath:$dllsearchdir"
1281 dllsearchpath
="$dllsearchdir"
1285 elif test "$hardcode_minus_L" = no
; then
1288 compile_shlibpath
="$compile_shlibpath$dir:"
1291 case "$compile_command " in
1293 *) compile_command
="$compile_command -L$dir";;
1295 compile_command
="$compile_command -l$name"
1296 deplibs
="$deplibs -L$dir -l$name"
1297 elif test "$hardcode_shlibpath_var" = no
; then
1298 case ":$compile_shlibpath:" in
1300 *) compile_shlibpath
="$compile_shlibpath$dir:";;
1302 compile_command
="$compile_command -l$name"
1303 deplibs
="$deplibs -l$name"
1310 if test "$hardcode_direct" = yes; then
1311 compile_command
="$compile_command $absdir/$linklib"
1312 deplibs
="$deplibs $absdir/$linklib"
1313 elif test "$hardcode_minus_L" = yes; then
1314 case "$compile_command " in
1316 *) compile_command
="$compile_command -L$absdir";;
1318 compile_command
="$compile_command -l$name"
1319 deplibs
="$deplibs -L$absdir -l$name"
1320 elif test "$hardcode_shlibpath_var" = yes; then
1321 case ":$compile_shlibpath:" in
1323 *) compile_shlibpath
="$compile_shlibpath$absdir:";;
1325 compile_command
="$compile_command -l$name"
1326 deplibs
="$deplibs -l$name"
1337 if test "$lib_linked" != yes; then
1338 $echo "$modename: configuration error: unsupported hardcode properties"
1342 # Finalize command for both is simple: just hardcode it.
1343 if test "$hardcode_direct" = yes; then
1344 finalize_command
="$finalize_command $libdir/$linklib"
1345 elif test "$hardcode_minus_L" = yes; then
1346 case "$finalize_command " in
1348 *) finalize_command
="$finalize_command -L$libdir";;
1350 finalize_command
="$finalize_command -l$name"
1351 elif test "$hardcode_shlibpath_var" = yes; then
1352 case ":$finalize_shlibpath:" in
1354 *) finalize_shlibpath
="$finalize_shlibpath$libdir:";;
1356 finalize_command
="$finalize_command -l$name"
1358 # We cannot seem to hardcode it, guess we'll fake it.
1359 case "$finalize_command " in
1361 *) finalize_command
="$finalize_command -L$libdir";;
1363 finalize_command
="$finalize_command -l$name"
1366 # Transform directly to old archives if we don't build new libraries.
1367 if test -n "$pic_flag" && test -z "$old_library"; then
1368 $echo "$modename: cannot find static library for \`$arg'" 1>&2
1372 # Here we assume that one of hardcode_direct or hardcode_minus_L
1373 # is not unsupported. This is valid on all known static and
1375 if test "$hardcode_direct" != unsupported
; then
1376 test -n "$old_library" && linklib
="$old_library"
1377 compile_command
="$compile_command $dir/$linklib"
1378 finalize_command
="$finalize_command $dir/$linklib"
1380 case "$compile_command " in
1382 *) compile_command
="$compile_command -L$dir";;
1384 compile_command
="$compile_command -l$name"
1385 case "$finalize_command " in
1387 *) finalize_command
="$finalize_command -L$dir";;
1389 finalize_command
="$finalize_command -l$name"
1393 # Add in any libraries that this one depends upon.
1394 compile_command
="$compile_command$dependency_libs"
1395 finalize_command
="$finalize_command$dependency_libs"
1399 # Some other compiler argument.
1401 # Unknown arguments in both finalize_command and compile_command need
1402 # to be aesthetically quoted because they are evaled later.
1403 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1405 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1412 # Now actually substitute the argument into the commands.
1413 if test -n "$arg"; then
1414 compile_command
="$compile_command $arg"
1415 finalize_command
="$finalize_command $arg"
1419 if test -n "$prev"; then
1420 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1426 # calculate the name of the file, without its directory
1427 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1428 libobjs_save
="$libobjs"
1432 $echo "$modename: you must specify an output file" 1>&2
1438 if test -n "$link_against_libtool_libs"; then
1439 $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
1443 if test -n "$deplibs"; then
1444 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
1447 if test -n "$dlfiles$dlprefiles"; then
1448 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
1451 if test -n "$rpath"; then
1452 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
1455 if test -n "$xrpath"; then
1456 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
1459 if test -n "$vinfo"; then
1460 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
1463 if test -n "$release"; then
1464 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
1467 if test -n "$export_symbols"; then
1468 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
1471 # Now set the variables for building old libraries.
1472 build_libtool_libs
=no
1477 # Make sure we only generate libraries of the form `libNAME.la'.
1478 case "$outputname" in
1480 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1481 eval libname
=\"$libname_spec\"
1484 if test "$module" = no
; then
1485 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
1489 if test "$need_lib_prefix" != no
; then
1490 # Add the "lib" prefix for modules if required
1491 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1492 eval libname
=\"$libname_spec\"
1494 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1499 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1500 if test "X$output_objdir" = "X$output"; then
1501 output_objdir
="$objdir"
1503 output_objdir
="$output_objdir/$objdir"
1506 # All the library-specific variables (install_libdir is set above).
1511 if test -n "$objs"; then
1512 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
1516 # How the heck are we supposed to write a wrapper for a shared library?
1517 if test -n "$link_against_libtool_libs"; then
1518 $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
1522 if test -n "$dlfiles$dlprefiles"; then
1523 $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
1527 if test $# -gt 2; then
1528 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
1533 if test -z "$rpath"; then
1534 if test "$build_libtool_libs" = yes; then
1535 # Building a libtool convenience library.
1537 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
1538 build_libtool_libs
=convenience
1541 dependency_libs
="$deplibs"
1543 if test -n "$vinfo"; then
1544 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
1547 if test -n "$release"; then
1548 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
1552 # Parse the version information argument.
1553 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=':'
1554 set dummy
$vinfo 0 0 0
1557 if test -n "$8"; then
1558 $echo "$modename: too many parameters to \`-version-info'" 1>&2
1567 # Check that each of the things are valid numbers.
1569 0 |
[1-9] |
[1-9][0-9]*) ;;
1571 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
1572 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1578 0 |
[1-9] |
[1-9][0-9]*) ;;
1580 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
1581 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1587 0 |
[1-9] |
[1-9][0-9]*) ;;
1589 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
1590 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1595 if test $age -gt $current; then
1596 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
1597 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1601 # Calculate the version variables.
1605 case "$version_type" in
1609 major
=`expr $current - $age + 1`
1610 versuffix
="$major.$revision"
1611 verstring
="sgi$major.$revision"
1613 # Add in all the interfaces that we are compatible with.
1615 while test $loop != 0; do
1616 iface
=`expr $revision - $loop`
1617 loop
=`expr $loop - 1`
1618 verstring
="sgi$major.$iface:$verstring"
1623 major
=.
`expr $current - $age`
1624 versuffix
="$major.$age.$revision"
1628 major
=`expr $current - $age`
1629 versuffix
=".$current.$age.$revision"
1630 verstring
="$current.$age.$revision"
1632 # Add in all the interfaces that we are compatible with.
1634 while test $loop != 0; do
1635 iface
=`expr $current - $loop`
1636 loop
=`expr $loop - 1`
1637 verstring
="$verstring:${iface}.0"
1640 # Make executables depend on our current version.
1641 verstring
="$verstring:${current}.0"
1646 versuffix
=".$current.$revision"
1651 versuffix
=".$current.$revision";
1656 versuffix
=".$current";
1660 # Like Linux, but with '-' rather than '.', since we only
1661 # want one extension on Windows 95.
1662 major
=`expr $current - $age`
1663 versuffix
="-$major-$age-$revision"
1667 $echo "$modename: unknown library version type \`$version_type'" 1>&2
1668 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
1673 # Clear the version info if we defaulted, and they specified a release.
1674 if test -z "$vinfo" && test -n "$release"; then
1677 if test "$need_version" = no
; then
1684 # Remove version info from name if versioning should be avoided
1685 if test "$avoid_version" = yes && test "$need_version" = no
; then
1691 # Check to see if the archive will have undefined symbols.
1692 if test "$allow_undefined" = yes; then
1693 if test "$allow_undefined_flag" = unsupported
; then
1694 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
1695 build_libtool_libs
=no
1699 # Don't allow undefined symbols.
1700 allow_undefined_flag
="$no_undefined_flag"
1703 dependency_libs
="$deplibs"
1705 *-*-cygwin* |
*-*-mingw* |
*-*-os2*)
1706 # these systems don't actually have a c library (as such)!
1709 # Add libc to deplibs on all other systems.
1710 deplibs
="$deplibs -lc"
1715 # Create the output directory, or remove our outputs if we need to.
1716 if test -d $output_objdir; then
1717 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
1718 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.
*
1720 $show "$mkdir $output_objdir"
1721 $run $mkdir $output_objdir
1723 if test $status -ne 0 && test ! -d $output_objdir; then
1728 # Now set the variables for building old libraries.
1729 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
1730 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
1732 # Transform .lo files to .o files.
1733 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
1736 if test "$build_libtool_libs" = yes; then
1737 # Transform deplibs into only deplibs that can be linked in shared.
1739 libname_save
=$libname
1740 release_save
=$release
1741 versuffix_save
=$versuffix
1743 # I'm not sure if I'm treating the release correctly. I think
1744 # release should show up in the -l (ie -lgmp5) so we don't want to
1745 # add it in twice. Is that correct?
1751 case "$deplibs_check_method" in
1754 ;; # Don't check for shared/static. Everything works.
1755 # This might be a little naive. We might want to check
1756 # whether the library exists or not. But this is on
1757 # osf3 & osf4 and I'm not really sure... Just
1758 # implementing what was already the behaviour.
1760 # This code stresses the "libraries are programs" paradigm to its
1761 # limits. Maybe even breaks it. We compile a program, linking it
1762 # against the deplibs as a proxy for the library. Then we can check
1763 # whether they linked in statically or dynamically with ldd.
1765 cat > conftest.c
<<EOF
1766 int main() { return 0; }
1769 $C_compiler -o conftest conftest.c
$deplibs
1770 if test $?
-eq 0 ; then
1771 ldd_output
=`ldd conftest`
1772 for i
in $deplibs; do
1773 name
="`expr $i : '-l\(.*\)'`"
1774 # If $name is empty we are operating on a -L argument.
1775 if test "$name" != "" ; then
1776 libname
=`eval \\$echo \"$libname_spec\"`
1777 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
1778 set dummy
$deplib_matches
1780 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
1781 newdeplibs
="$newdeplibs $i"
1785 echo "*** Warning: This library needs some functionality provided by $i."
1786 echo "*** I have the capability to make that library automatically link in when"
1787 echo "*** you link to this library. But I can only do this if you have a"
1788 echo "*** shared version of the library, which you do not appear to have."
1791 newdeplibs
="$newdeplibs $i"
1795 # Error occured in the first compile. Let's try to salvage the situation:
1796 # Compile a seperate program for each library.
1797 for i
in $deplibs; do
1798 name
="`expr $i : '-l\(.*\)'`"
1799 # If $name is empty we are operating on a -L argument.
1800 if test "$name" != "" ; then
1802 $C_compiler -o conftest conftest.c
$i
1804 if test $?
-eq 0 ; then
1805 ldd_output
=`ldd conftest`
1806 libname
=`eval \\$echo \"$libname_spec\"`
1807 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
1808 set dummy
$deplib_matches
1810 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
1811 newdeplibs
="$newdeplibs $i"
1815 echo "*** Warning: This library needs some functionality provided by $i."
1816 echo "*** I have the capability to make that library automatically link in when"
1817 echo "*** you link to this library. But I can only do this if you have a"
1818 echo "*** shared version of the library, which you do not appear to have."
1823 echo "*** Warning! Library $i is needed by this library but I was not able to"
1824 echo "*** make it link in! You will probably need to install it or some"
1825 echo "*** library that it depends on before this library will be fully"
1826 echo "*** functional. Installing it before continuing would be even better."
1829 newdeplibs
="$newdeplibs $i"
1836 set dummy
$deplibs_check_method
1837 file_magic_regex
="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
1838 for a_deplib
in $deplibs; do
1839 name
="`expr $a_deplib : '-l\(.*\)'`"
1840 # If $name is empty we are operating on a -L argument.
1841 if test "$name" != "" ; then
1842 libname
=`eval \\$echo \"$libname_spec\"`
1843 for i
in $lib_search_path; do
1844 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
1845 for potent_lib
in $potential_libs; do
1846 # Follow soft links.
1847 if ls -lLd "$potlib" 2>/dev
/null \
1848 |
grep " -> " >/dev
/null
; then
1851 # The statement above tries to avoid entering an
1852 # endless loop below, in case of cyclic links.
1853 # We might still enter an endless loop, since a link
1854 # loop can be closed while we follow links,
1856 potlib
="$potent_lib"
1857 while test -h "$potlib" 2>/dev
/null
; do
1858 potliblink
=`ls -ld $potlib | sed 's/.* -> //'`
1859 case "$potliblink" in
1860 /*) potlib
="$potliblink";;
1861 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
1864 if eval $file_magic_cmd \"\
$potlib\" \
1866 |
egrep "$file_magic_regex" > /dev
/null
; then
1867 newdeplibs
="$newdeplibs $a_deplib"
1873 if test -n "$a_deplib" ; then
1876 echo "*** Warning: This library needs some functionality provided by $a_deplib."
1877 echo "*** I have the capability to make that library automatically link in when"
1878 echo "*** you link to this library. But I can only do this if you have a"
1879 echo "*** shared version of the library, which you do not appear to have."
1882 # Add a -L argument.
1883 newdeplibs
="$newdeplibs $a_deplib"
1885 done # Gone through all deplibs.
1887 none | unknown |
*) newdeplibs
=""
1888 if $echo "X $deplibs" |
$Xsed -e 's/ -lc$//' \
1889 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
1890 grep .
>/dev
/null
; then
1892 if test "X$deplibs_check_method" = "Xnone"; then
1893 echo "*** Warning: inter-library dependencies are not supported in this platform."
1895 echo "*** Warning: inter-library dependencies are not known to be supported."
1897 echo "*** All declared inter-library dependencies are being dropped."
1902 versuffix
=$versuffix_save
1904 release
=$release_save
1905 libname
=$libname_save
1908 if test "$droppeddeps" = yes; then
1909 if test "$module" = yes; then
1911 echo "*** Warning: libtool could not satisfy all declared inter-library"
1912 echo "*** dependencies of module $libname. Therefore, libtool will create"
1913 echo "*** a static module, that should work as long as the dlopening"
1914 echo "*** application is linked with the -dlopen flag."
1915 if test -z "$global_symbol_pipe"; then
1917 echo "*** However, this would only work if libtool was able to extract symbol"
1918 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
1919 echo "*** not find such a program. So, this module is probably useless."
1920 echo "*** \`nm' from GNU binutils and a full rebuild may help."
1922 if test "$build_old_libs" = no
; then
1923 oldlibs
="$output_objdir/$libname.$libext"
1924 build_libtool_libs
=module
1927 build_libtool_libs
=no
1932 echo "*** The inter-library dependencies that have been dropped here will be"
1933 echo "*** automatically added whenever a program is linked with this library"
1934 echo "*** or is declared to -dlopen it."
1939 # test again, we may have decided not to build it any more
1940 if test "$build_libtool_libs" = yes; then
1942 # Done checking deplibs!
1944 # Get the real and link names of the library.
1945 eval library_names
=\"$library_names_spec\"
1946 set dummy
$library_names
1950 if test -n "$soname_spec"; then
1951 eval soname
=\"$soname_spec\"
1956 lib
="$output_objdir/$realname"
1959 linknames
="$linknames $link"
1962 # Ensure that we have .o objects for linkers which dislike .lo
1963 # (e.g. aix) incase we are running --disable-static
1964 for obj
in $libobjs; do
1965 oldobj
=`$echo "X$obj" | $Xsed -e "$lo2o"`
1966 test -f $oldobj ||
${LN_S} $obj $oldobj
1969 # Use standard objects if they are pic
1970 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
1972 if test -n "$whole_archive_flag_spec"; then
1973 if test -n "$convenience"; then
1974 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
1977 for xlib
in $convenience; do
1978 # Extract the objects.
1980 generated
="$generated $xdir"
1981 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
1983 $show "${rm}r $xdir"
1988 if test $status -ne 0 && test ! -d "$xdir"; then
1991 $show "(cd $xdir && $AR x ../$xlib)"
1992 $run eval "(cd \$xdir && $AR x ../\$xlib)" ||
exit $?
1994 libobjs
="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
1998 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
1999 eval flag
=\"$thread_safe_flag_spec\"
2001 linkopts
="$linkopts $flag"
2004 # Prepare the list of exported symbols
2005 if test -z "$export_symbols"; then
2006 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
2007 $show "generating symbol list for \`$libname.la'"
2008 export_symbols
="$objdir/$libname.exp"
2009 $run $rm $export_symbols
2010 eval cmds
=\"$export_symbols_cmds\"
2011 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2012 for cmd
in $cmds; do
2015 $run eval "$cmd" ||
exit $?
2018 if test -n "$export_symbols_regex"; then
2019 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
2020 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
2021 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
2022 $run eval '$mv "${export_symbols}T" "$export_symbols"'
2027 if test -n "$export_symbols" && test -n "$include_expsyms"; then
2028 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
2031 # Do each of the archive commands.
2032 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2033 eval cmds
=\"$archive_expsym_cmds\"
2035 eval cmds
=\"$archive_cmds\"
2037 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2038 for cmd
in $cmds; do
2041 $run eval "$cmd" ||
exit $?
2045 # Create links to the real library.
2046 for linkname
in $linknames; do
2047 if test "$realname" != "$linkname"; then
2048 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
2049 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
2053 # If -module or -export-dynamic was specified, set the dlname.
2054 if test "$module" = yes ||
test "$export_dynamic" = yes; then
2055 # On all known operating systems, these are identical.
2062 if test -n "$link_against_libtool_libs"; then
2063 $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
2067 if test -n "$deplibs"; then
2068 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
2071 if test -n "$dlfiles$dlprefiles"; then
2072 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
2075 if test -n "$rpath"; then
2076 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
2079 if test -n "$xrpath"; then
2080 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
2083 if test -n "$vinfo"; then
2084 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
2087 if test -n "$release"; then
2088 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
2093 if test -n "$objs"; then
2094 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
2098 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
2106 # Delete the old objects.
2107 $run $rm $obj $libobj
2109 # Create the old-style object.
2110 reload_objs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
2113 eval cmds
=\"$reload_cmds\"
2114 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2115 for cmd
in $cmds; do
2118 $run eval "$cmd" ||
exit $?
2122 # Exit if we aren't doing a library object file.
2123 test -z "$libobj" && exit 0
2125 if test "$build_libtool_libs" != yes; then
2126 # Create an invalid libtool object if no PIC, so that we don't
2127 # accidentally link it into a program.
2128 $show "echo timestamp > $libobj"
2129 $run eval "echo timestamp > $libobj" ||
exit $?
2133 if test -n "$pic_flag"; then
2134 # Only do commands if we really have different PIC objects.
2135 reload_objs
="$libobjs"
2137 eval cmds
=\"$reload_cmds\"
2138 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2139 for cmd
in $cmds; do
2142 $run eval "$cmd" ||
exit $?
2146 # Just create a symlink.
2149 $show "$LN_S $obj $libobj"
2150 $run $LN_S $obj $libobj ||
exit $?
2156 # Anything else should be a program.
2158 if test -n "$vinfo"; then
2159 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
2162 if test -n "$release"; then
2163 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
2166 if test "$preload" = yes; then
2167 if test "$dlopen" = unknown
&& test "$dlopen_self" = unknown
&&
2168 test "$dlopen_self_static" = unknown
; then
2169 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
2173 if test "$dlself" = yes && test "$export_dynamic" = no
; then
2174 $echo "$modename: error: \`-dlopen self' requires \`-export-dynamic'" 1>&2
2178 if test -n "$rpath$xrpath"; then
2179 # If the user specified any rpath flags, then add them.
2180 for libdir
in $rpath $xrpath; do
2181 # This is the magic to use -rpath.
2182 case "$compile_rpath " in
2184 *) compile_rpath
="$compile_rpath $libdir" ;;
2186 case "$finalize_rpath " in
2188 *) finalize_rpath
="$finalize_rpath $libdir" ;;
2193 # Now hardcode the library paths
2196 for libdir
in $compile_rpath $finalize_rpath; do
2197 if test -n "$hardcode_libdir_flag_spec"; then
2198 if test -n "$hardcode_libdir_separator"; then
2199 if test -z "$hardcode_libdirs"; then
2200 hardcode_libdirs
="$libdir"
2202 # Just accumulate the unique libdirs.
2203 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2204 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2207 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2212 eval flag
=\"$hardcode_libdir_flag_spec\"
2214 rpath
="$rpath $flag"
2216 elif test -n "$runpath_var"; then
2217 case "$perm_rpath " in
2219 *) perm_rpath
="$perm_rpath $libdir" ;;
2223 # Substitute the hardcoded libdirs into the rpath.
2224 if test -n "$hardcode_libdir_separator" &&
2225 test -n "$hardcode_libdirs"; then
2226 libdir
="$hardcode_libdirs"
2227 eval rpath
=\" $hardcode_libdir_flag_spec\"
2229 compile_rpath
="$rpath"
2233 for libdir
in $finalize_rpath; do
2234 if test -n "$hardcode_libdir_flag_spec"; then
2235 if test -n "$hardcode_libdir_separator"; then
2236 if test -z "$hardcode_libdirs"; then
2237 hardcode_libdirs
="$libdir"
2239 # Just accumulate the unique libdirs.
2240 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2241 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2244 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2249 eval flag
=\"$hardcode_libdir_flag_spec\"
2251 rpath
="$rpath $flag"
2253 elif test -n "$runpath_var"; then
2254 case "$finalize_perm_rpath " in
2256 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
2260 # Substitute the hardcoded libdirs into the rpath.
2261 if test -n "$hardcode_libdir_separator" &&
2262 test -n "$hardcode_libdirs"; then
2263 libdir
="$hardcode_libdirs"
2264 eval rpath
=\" $hardcode_libdir_flag_spec\"
2266 finalize_rpath
="$rpath"
2268 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2269 if test "X$output_objdir" = "X$output"; then
2270 output_objdir
="$objdir"
2272 output_objdir
="$output_objdir/$objdir"
2275 if test -n "$libobjs" && test "$build_old_libs" = yes; then
2276 # Transform all the library objects into standard objects.
2277 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2278 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2282 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" = yes; then
2283 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2284 dlsyms
="${outputname}S.c"
2286 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
2290 if test -n "$dlsyms"; then
2294 # Discover the nlist of each of the dlfiles.
2295 nlist
="$objdir/${output}.nm"
2297 if test -d $objdir; then
2298 $show "$rm $nlist ${nlist}S ${nlist}T"
2299 $run $rm "$nlist" "${nlist}S" "${nlist}T"
2301 $show "$mkdir $objdir"
2304 if test $status -ne 0 && test ! -d $objdir; then
2309 # Parse the name list into a source file.
2310 $show "creating $objdir/$dlsyms"
2312 $echo > "$objdir/$dlsyms" "\
2313 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
2314 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
2320 /* Prevent the only kind of declaration conflicts we can make. */
2321 #define lt_preloaded_symbols some_other_symbol
2323 /* External symbol declarations for the compiler. */\
2326 if test "$dlself" = yes; then
2327 $show "generating symbol list for \`$output'"
2329 echo ': @PROGRAM@ ' > "$nlist"
2331 # Add our own program objects to the symbol list.
2332 progfiles
=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2333 for arg
in $progfiles; do
2334 $show "extracting global C symbols from \`$arg'"
2335 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2338 if test -n "$exclude_expsyms"; then
2339 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
2340 $run eval '$mv "$nlist"T "$nlist"'
2343 if test -n "$export_symbols_regex"; then
2344 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
2345 $run eval '$mv "$nlist"T "$nlist"'
2348 # Prepare the list of exported symbols
2349 if test -z "$export_symbols"; then
2350 export_symbols
="$objdir/$output.exp"
2351 $run $rm $export_symbols
2352 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2354 $run $rm $export_symbols
2355 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$objdir/$output.exp"'
2356 $run eval 'grep -f "$objdir/$output.exp" < "$nlist" > "$nlist"T'
2357 $run eval 'mv "$nlist"T "$nlist"'
2361 for arg
in $dlprefiles; do
2362 $show "extracting global C symbols from \`$arg'"
2363 name
=`echo "$arg" | sed -e 's%^.*/%%'`
2364 $run eval 'echo ": $name " >> "$nlist"'
2365 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2368 if test -z "$run"; then
2369 # Make sure we have at least an empty file.
2370 test -f "$nlist" ||
: > "$nlist"
2372 if test -n "$exclude_expsyms"; then
2373 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2374 $mv "$nlist"T
"$nlist"
2377 # Try sorting and uniquifying the output.
2378 if grep -v "^: " < "$nlist" |
sort +2 |
uniq > "$nlist"S
; then
2381 grep -v "^: " < "$nlist" > "$nlist"S
2384 if test -f "$nlist"S
; then
2385 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
2387 echo '/* NONE */' >> "$output_objdir/$dlsyms"
2390 $echo >> "$output_objdir/$dlsyms" "\
2392 #undef lt_preloaded_symbols
2394 #if defined (__STDC__) && __STDC__
2395 # define lt_ptr_t void *
2397 # define lt_ptr_t char *
2401 /* The mapping between symbol names and symbols. */
2406 lt_preloaded_symbols[] =
2410 sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
2411 -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
2412 < "$nlist" >> "$output_objdir/$dlsyms"
2414 $echo >> "$output_objdir/$dlsyms" "\
2418 /* This works around a problem in FreeBSD linker */
2419 #ifdef FREEBSD_WORKAROUND
2420 static const void *lt_preloaded_setup() {
2421 return lt_preloaded_symbols;
2431 pic_flag_for_symtable
=
2433 # compiling the symbol table file with pic_flag works around
2434 # a FreeBSD bug that causes programs to crash when -lm is
2435 # linked before any other PIC object. But we must not use
2436 # pic_flag when linking with -static. The problem exists in
2437 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2438 *-*-freebsd2*|
*-*-freebsd3.0
*)
2439 case "$compile_command " in
2441 *) pic_flag_for_symtable
=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
2445 # Now compile the dynamic symbol file.
2446 $show "(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
2447 $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
2449 # Transform the symbol file into the correct name.
2450 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
2451 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
2454 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
2459 # We keep going just in case the user didn't refer to
2460 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
2461 # really was required.
2463 # Nullify the symbol file.
2464 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2465 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2468 if test -z "$link_against_libtool_libs" ||
test "$build_libtool_libs" != yes; then
2469 # Replace the output file specification.
2470 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
2471 link_command
="$compile_command$compile_rpath"
2473 # We have no uninstalled library dependencies, so finalize right now.
2474 $show "$link_command"
2475 $run eval "$link_command"
2479 if test -n "$shlibpath_var"; then
2480 # We should set the shlibpath_var
2482 for dir
in $temp_rpath; do
2484 /* |
[A-Za-z
]:[/\\]*)
2489 # Relative path: add a thisdir entry.
2490 rpath
="$rpath\$thisdir/$dir:"
2497 if test -n "$compile_shlibpath$finalize_shlibpath"; then
2498 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
2500 if test -n "$finalize_shlibpath"; then
2501 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
2506 if test -n "$runpath_var"; then
2507 if test -n "$perm_rpath"; then
2508 # We should set the runpath_var.
2510 for dir
in $perm_rpath; do
2513 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
2515 if test -n "$finalize_perm_rpath"; then
2516 # We should set the runpath_var.
2518 for dir
in $finalize_perm_rpath; do
2521 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
2525 if test "$hardcode_action" = relink
; then
2526 # Fast installation is not supported
2527 link_command
="$compile_var$compile_command$compile_rpath"
2528 relink_command
="$finalize_var$finalize_command$finalize_rpath"
2530 # AGH! Flame the AIX and HP-UX people for me, will ya?
2531 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
2532 $echo "$modename: \`$output' will be relinked during installation" 1>&2
2534 if test "$fast_install" != no
; then
2535 link_command
="$finalize_var$compile_command$finalize_rpath"
2536 if test "$fast_install" = yes; then
2537 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
2539 # fast_install is set to needless
2543 link_command
="$compile_var$compile_command$compile_rpath"
2544 relink_command
="$finalize_var$finalize_command$finalize_rpath"
2548 # Replace the output file specification.
2549 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
2551 # Create the binary in the object directory, then wrap it.
2552 if test ! -d $output_objdir; then
2553 $show "$mkdir $output_objdir"
2554 $run $mkdir $output_objdir
2556 if test $status -ne 0 && test ! -d $objdir; then
2561 # Delete the old output file.
2562 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
2564 $show "$link_command"
2565 $run eval "$link_command" ||
exit $?
2567 # Now create the wrapper script.
2568 $show "creating $output"
2570 # Quote the relink command for shipping.
2571 if test -n "$relink_command"; then
2572 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
2575 # Quote $echo for shipping.
2576 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
2578 /* |
[A-Za-z
]:[/\\]*) qecho
="$SHELL $0 --fallback-echo";;
2579 *) qecho
="$SHELL `pwd`/$0 --fallback-echo";;
2581 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
2583 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
2586 # Only actually do things if our run command is non-null.
2587 if test -z "$run"; then
2588 # win32 will think the script is a binary if it has
2589 # a .exe suffix, so we strip it off here.
2591 *.exe
) output
=`echo $output|sed 's,.exe$,,'` ;;
2594 trap "$rm $output; exit 1" 1 2 15
2599 # $output - temporary wrapper script for $objdir/$outputname
2600 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
2602 # The $output program cannot be directly executed until all the libtool
2603 # libraries that it depends on are installed.
2605 # This wrapper script should never be moved out of the build directory.
2606 # If it is, it will not operate correctly.
2608 # Sed substitution that helps us do robust quoting. It backslashifies
2609 # metacharacters that are still active within double-quoted strings.
2610 Xsed='sed -e 1s/^X//'
2611 sed_quote_subst='$sed_quote_subst'
2613 # The HP-UX ksh and POSIX shell print the target directory to stdout
2615 if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
2617 relink_command=\"$relink_command\"
2619 # This environment variable determines our operation mode.
2620 if test \"\$libtool_install_magic\" = \"$magic\"; then
2621 # install mode needs the following variable:
2622 link_against_libtool_libs='$link_against_libtool_libs'
2624 # When we are sourced in execute mode, \$file and \$echo are already set.
2625 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2628 # Make sure echo works.
2629 if test \"X\$1\" = X--no-reexec; then
2630 # Discard the --no-reexec flag, and continue.
2632 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
2633 # Yippee, \$echo works!
2636 # Restart under the correct shell, and then maybe \$echo will work.
2637 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2643 # Find the directory that this script lives in.
2644 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2645 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2647 # Follow symbolic links until we get to the real thisdir.
2648 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
2649 while test -n \"\$file\"; do
2650 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2652 # If there was a directory component, then change thisdir.
2653 if test \"x\$destdir\" != \"x\$file\"; then
2654 case \"\$destdir\" in
2655 /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;;
2656 *) thisdir=\"\$thisdir/\$destdir\" ;;
2660 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2661 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
2664 # Try to get the absolute directory name.
2665 absdir=\`cd \"\$thisdir\" && pwd\`
2666 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2669 if test "$fast_install" = yes; then
2671 program=lt-'$outputname'
2672 progdir=\"\$thisdir/$objdir\"
2674 if test ! -f \"\$progdir/\$program\" || \\
2675 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
2676 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2678 file=\"\$\$-\$program\"
2680 if test ! -d \"\$progdir\"; then
2681 $mkdir \"\$progdir\"
2683 $rm \"\$progdir/\$file\"
2688 # relink executable if necessary
2689 if test -n \"\$relink_command\"; then
2690 if (cd \"\$thisdir\" && eval \$relink_command); then :
2692 $rm \"\$progdir/\$file\"
2697 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2698 { $rm \"\$progdir/\$program\";
2699 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2700 $rm \"\$progdir/\$file\"
2704 program='$outputname'
2705 progdir=\"\$thisdir/$objdir\"
2711 if test -f \"\$progdir/\$program\"; then"
2713 # Export our shlibpath_var if we have one.
2714 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2716 # Add our own library path to $shlibpath_var
2717 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2719 # Some systems cannot cope with colon-terminated $shlibpath_var
2720 # The second colon is a workaround for a bug in BeOS R4 sed
2721 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2723 export $shlibpath_var
2727 # fixup the dll searchpath if we need to.
2728 if test -n "$dllsearchpath"; then
2730 # Add the dll search path components to the executable PATH
2731 PATH=$dllsearchpath:\$PATH
2736 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2737 # Run the actual program with our arguments.
2740 *-*-cygwin* |
*-*-mingw |
*-*-os2*)
2741 # win32 systems need to use the prog path for dll
2744 exec \$progdir\\\\\$program \${1+\"\$@\"}
2749 # Export the path to the program.
2750 PATH=\"\$progdir:\$PATH\"
2753 exec \$program \${1+\"\$@\"}
2758 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
2762 # The program doesn't exist.
2763 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
2764 \$echo \"This script is just a wrapper for \$program.\" 1>&2
2765 echo \"See the $PACKAGE documentation for more information.\" 1>&2
2776 # See if we need to build an old-fashioned archive.
2777 for oldlib
in $oldlibs; do
2779 if test "$build_libtool_libs" = convenience
; then
2780 oldobjs
="$libobjs_save"
2781 addlibs
="$convenience"
2782 build_libtool_libs
=no
2784 if test "$build_libtool_libs" = module
; then
2785 oldobjs
="$libobjs_save"
2786 build_libtool_libs
=no
2788 oldobjs
="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
2790 addlibs
="$old_convenience"
2793 # Add in members from convenience archives.
2794 for xlib
in $addlibs; do
2795 # Extract the objects.
2797 generated
="$generated $xdir"
2798 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2800 $show "${rm}r $xdir"
2805 if test $status -ne 0 && test ! -d "$xdir"; then
2808 $show "(cd $xdir && $AR x ../$xlib)"
2809 $run eval "(cd \$xdir && $AR x ../\$xlib)" ||
exit $?
2811 oldobjs
="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2814 # Do each command in the archive commands.
2815 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
2816 eval cmds
=\"$old_archive_from_new_cmds\"
2818 eval cmds
=\"$old_archive_cmds\"
2820 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2821 for cmd
in $cmds; do
2824 $run eval "$cmd" ||
exit $?
2829 if test -n "$generated"; then
2830 $show "${rm}r$generated"
2831 $run ${rm}r
$generated
2834 # Now create the libtool archive.
2838 test "$build_old_libs" = yes && old_library
="$libname.$libext"
2839 $show "creating $output"
2841 if test -n "$xrpath"; then
2843 for libdir
in $xrpath; do
2844 temp_xrpath
="$temp_xrpath -R$libdir"
2846 dependency_libs
="$temp_xrpath $dependency_libs"
2849 # Only create the output if not a dry run.
2850 if test -z "$run"; then
2852 # $output - a libtool library file
2853 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
2855 # The name that we can dlopen(3).
2858 # Names of this library.
2859 library_names='$library_names'
2861 # The name of the static archive.
2862 old_library='$old_library'
2864 # Libraries that this one depends upon.
2865 dependency_libs='$dependency_libs'
2867 # Version information for $libname.
2872 # Is this an already installed library?
2875 # Directory that this library needs to be installed in:
2876 libdir='$install_libdir'\
2879 $rm "$output_objdir/$outputname"i
2880 sed 's/^installed=no$/installed=yes/' \
2881 < "$output" > "$output_objdir/$outputname"i ||
exit 1
2884 # Do a symbolic link so that the libtool archive can be found in
2885 # LD_LIBRARY_PATH before the program is installed.
2886 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
2887 $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" ||
exit $?
2893 # libtool install mode
2895 modename
="$modename: install"
2897 # There may be an optional sh(1) argument at the beginning of
2898 # install_prog (especially on Windows NT).
2899 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh
; then
2900 # Aesthetically quote it.
2901 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
2903 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
2907 install_prog
="$arg "
2915 # The real first argument should be the name of the installation program.
2916 # Aesthetically quote it.
2917 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2919 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
2923 install_prog
="$install_prog$arg"
2925 # We need to accept at least all the BSD install flags.
2935 if test -n "$dest"; then
2936 files
="$files $dest"
2954 # If the previous option needed an argument, then skip it.
2955 if test -n "$prev"; then
2964 # Aesthetically quote the argument.
2965 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2967 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
2971 install_prog
="$install_prog $arg"
2974 if test -z "$install_prog"; then
2975 $echo "$modename: you must specify an install program" 1>&2
2980 if test -n "$prev"; then
2981 $echo "$modename: the \`$prev' option requires an argument" 1>&2
2986 if test -z "$files"; then
2987 if test -z "$dest"; then
2988 $echo "$modename: no file or destination specified" 1>&2
2990 $echo "$modename: you must specify a destination" 1>&2
2996 # Strip any trailing slash from the destination.
2997 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
2999 # Check to see that the destination is a directory.
3000 test -d "$dest" && isdir
=yes
3001 if test "$isdir" = yes; then
3005 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
3006 test "X$destdir" = "X$dest" && destdir
=.
3007 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
3009 # Not a directory, so check to see that there is only one file specified.
3011 if test $# -gt 2; then
3012 $echo "$modename: \`$dest' is not a directory" 1>&2
3018 /* |
[A-Za-z
]:[/\\]*) ;;
3020 for file in $files; do
3024 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
3033 # This variable tells wrapper scripts just to set variables rather
3034 # than running their programs.
3035 libtool_install_magic
="$magic"
3040 for file in $files; do
3042 # Do each installation.
3045 # Do the static libraries later.
3046 staticlibs
="$staticlibs $file"
3050 # Check to see that this really is a libtool archive.
3051 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
3053 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
3060 # If there is no directory component, then add one.
3062 */* |
*\\*) .
$file ;;
3066 # Add the libdir to current_libdirs if it is the destination.
3067 if test "X$destdir" = "X$libdir"; then
3068 case "$current_libdirs " in
3070 *) current_libdirs
="$current_libdirs $libdir" ;;
3073 # Note the libdir as a future libdir.
3074 case "$future_libdirs " in
3076 *) future_libdirs
="$future_libdirs $libdir" ;;
3080 dir
="`$echo "X
$file" | $Xsed -e 's%/[^/]*$%%'`/"
3081 test "X$dir" = "X$file/" && dir
=
3084 # See the names of the shared library.
3085 set dummy
$library_names
3086 if test -n "$2"; then
3091 # Install the shared library and build the symlinks.
3092 $show "$install_prog $dir/$realname $destdir/$realname"
3093 $run eval "$install_prog $dir/$realname $destdir/$realname" ||
exit $?
3094 test "X$dlname" = "X$realname" && dlname
=
3096 if test $# -gt 0; then
3097 # Delete the old symlinks, and create new ones.
3100 test "X$dlname" = "X$linkname" && dlname
=
3101 if test "$linkname" != "$realname"; then
3102 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3103 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3108 if test -n "$dlname"; then
3109 # Install the dynamically-loadable library.
3110 $show "$install_prog $dir/$dlname $destdir/$dlname"
3111 $run eval "$install_prog $dir/$dlname $destdir/$dlname" ||
exit $?
3114 # Do each command in the postinstall commands.
3115 lib
="$destdir/$realname"
3116 eval cmds
=\"$postinstall_cmds\"
3117 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3118 for cmd
in $cmds; do
3121 $run eval "$cmd" ||
exit $?
3126 # Install the pseudo-library for information purposes.
3127 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3128 instname
="$dir/$name"i
3129 if test ! -f "$instname"; then
3130 # Just in case it was removed...
3131 $show "Creating $instname"
3133 sed 's/^installed=no$/installed=yes/' "$file" > "$instname"
3135 $show "$install_prog $instname $destdir/$name"
3136 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
3138 # Maybe install the static library, too.
3139 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
3143 # Install (i.e. copy) a libtool object.
3145 # Figure out destination file name, if it wasn't already specified.
3146 if test -n "$destname"; then
3147 destfile
="$destdir/$destname"
3149 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3150 destfile
="$destdir/$destfile"
3153 # Deduce the name of the destination old-style object file.
3156 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
3159 staticdest
="$destfile"
3163 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
3169 # Install the libtool object if requested.
3170 if test -n "$destfile"; then
3171 $show "$install_prog $file $destfile"
3172 $run eval "$install_prog $file $destfile" ||
exit $?
3175 # Install the old object if enabled.
3176 if test "$build_old_libs" = yes; then
3177 # Deduce the name of the old-style object file.
3178 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
3180 $show "$install_prog $staticobj $staticdest"
3181 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
3187 # Figure out destination file name, if it wasn't already specified.
3188 if test -n "$destname"; then
3189 destfile
="$destdir/$destname"
3191 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3192 destfile
="$destdir/$destfile"
3195 # Do a test to see if this is really a libtool program.
3196 if (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
3197 link_against_libtool_libs
=
3200 # If there is no directory component, then add one.
3202 */* |
*\\*) .
$file ;;
3206 # Check the variables that should have been set.
3207 if test -z "$link_against_libtool_libs"; then
3208 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
3213 for lib
in $link_against_libtool_libs; do
3214 # Check to see that each library is installed.
3216 if test -f "$lib"; then
3217 # If there is no directory component, then add one.
3219 */* |
*\\*) .
$lib ;;
3223 libfile
="$libdir/`$echo "X
$lib" | $Xsed -e 's%^.*/%%g'`"
3224 if test -n "$libdir" && test ! -f "$libfile"; then
3225 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
3231 if test "$fast_install" = no
&& test -n "$relink_command"; then
3232 if test "$finalize" = yes; then
3233 outputname
="/tmp/$$-$file"
3234 # Replace the output file specification.
3235 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
3237 $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
3238 $show "$relink_command"
3239 if $run eval "$relink_command"; then :
3241 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
3246 $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
3249 # Install the binary that we compiled earlier.
3250 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
3254 $show "$install_prog$stripme $file $destfile"
3255 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
3256 test -n "$outputname" && $rm $outputname
3261 for file in $staticlibs; do
3262 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3264 # Set up the ranlib parameters.
3265 oldlib
="$destdir/$name"
3267 $show "$install_prog $file $oldlib"
3268 $run eval "$install_prog \$file \$oldlib" ||
exit $?
3270 # Do each command in the postinstall commands.
3271 eval cmds
=\"$old_postinstall_cmds\"
3272 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3273 for cmd
in $cmds; do
3276 $run eval "$cmd" ||
exit $?
3281 if test -n "$future_libdirs"; then
3282 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
3285 if test -n "$current_libdirs"; then
3286 # Maybe just do a dry run.
3287 test -n "$run" && current_libdirs
=" -n$current_libdirs"
3288 exec $SHELL $0 --finish$current_libdirs
3295 # libtool finish mode
3297 modename
="$modename: finish"
3301 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3304 libdirs
="$libdirs $dir"
3307 for libdir
in $libdirs; do
3308 if test -n "$finish_cmds"; then
3309 # Do each command in the finish commands.
3310 eval cmds
=\"$finish_cmds\"
3311 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3312 for cmd
in $cmds; do
3315 $run eval "$cmd" || admincmds
="$admincmds
3320 if test -n "$finish_eval"; then
3321 # Do the single finish_eval.
3322 eval cmds
=\"$finish_eval\"
3323 $run eval "$cmds" || admincmds
="$admincmds
3329 # Exit here if they wanted silent mode.
3330 test "$show" = : && exit 0
3332 echo "----------------------------------------------------------------------"
3333 echo "Libraries have been installed in:"
3334 for libdir
in $libdirs; do
3338 echo "If you ever happen to want to link against installed libraries"
3339 echo "in a given directory, LIBDIR, you must either use libtool, and"
3340 echo "specify the full pathname of the library, or use \`-LLIBDIR'"
3341 echo "flag during linking and do at least one of the following:"
3342 if test -n "$shlibpath_var"; then
3343 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
3344 echo " during execution"
3346 if test -n "$runpath_var"; then
3347 echo " - add LIBDIR to the \`$runpath_var' environment variable"
3348 echo " during linking"
3350 if test -n "$hardcode_libdir_flag_spec"; then
3352 eval flag
=\"$hardcode_libdir_flag_spec\"
3354 echo " - use the \`$flag' linker flag"
3356 if test -n "$admincmds"; then
3357 echo " - have your system administrator run these commands:$admincmds"
3359 if test -f /etc
/ld.so.conf
; then
3360 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3363 echo "See any operating system documentation about shared libraries for"
3364 echo "more information, such as the ld(1) and ld.so(8) manual pages."
3365 echo "----------------------------------------------------------------------"
3369 # libtool execute mode
3371 modename
="$modename: execute"
3373 # The first argument is the command name.
3375 if test -z "$cmd"; then
3376 $echo "$modename: you must specify a COMMAND" 1>&2
3381 # Handle -dlopen flags immediately.
3382 for file in $execute_dlfiles; do
3383 if test ! -f "$file"; then
3384 $echo "$modename: \`$file' is not a file" 1>&2
3392 # Check to see that this really is a libtool archive.
3393 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
3395 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3400 # Read the libtool library.
3404 # If there is no directory component, then add one.
3406 */* |
*\\*) .
$file ;;
3410 # Skip this library if it cannot be dlopened.
3411 if test -z "$dlname"; then
3412 # Warn if it was a shared library.
3413 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
3417 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3418 test "X$dir" = "X$file" && dir
=.
3420 if test -f "$dir/$objdir/$dlname"; then
3423 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
3429 # Just add the directory containing the .lo file.
3430 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3431 test "X$dir" = "X$file" && dir
=.
3435 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
3440 # Get the absolute pathname.
3441 absdir
=`cd "$dir" && pwd`
3442 test -n "$absdir" && dir
="$absdir"
3444 # Now add the directory to shlibpath_var.
3445 if eval "test -z \"\$$shlibpath_var\""; then
3446 eval "$shlibpath_var=\"\$dir\""
3448 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
3452 # This variable tells wrapper scripts just to set shlibpath_var
3453 # rather than running their programs.
3454 libtool_execute_magic
="$magic"
3456 # Check if any of the arguments is a wrapper script.
3463 # Do a test to see if this is really a libtool program.
3464 if (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
3465 # If there is no directory component, then add one.
3467 */* |
*\\*) .
$file ;;
3471 # Transform arg to wrapped name.
3472 file="$progdir/$program"
3476 # Quote arguments (to preserve shell metacharacters).
3477 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
3478 args
="$args \"$file\""
3481 if test -z "$run"; then
3482 # Export the shlibpath_var.
3483 eval "export $shlibpath_var"
3485 # Restore saved enviroment variables
3486 if test "${save_LC_ALL+set}" = set; then
3487 LC_ALL
="$save_LC_ALL"; export LC_ALL
3489 if test "${save_LANG+set}" = set; then
3490 LANG
="$save_LANG"; export LANG
3493 # Now actually exec the command.
3494 eval "exec \$cmd$args"
3496 $echo "$modename: cannot exec \$cmd$args"
3499 # Display what would be done.
3500 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
3501 $echo "export $shlibpath_var"
3507 # libtool uninstall mode
3509 modename
="$modename: uninstall"
3516 -*) rm="$rm $arg" ;;
3517 *) files
="$files $arg" ;;
3521 if test -z "$rm"; then
3522 $echo "$modename: you must specify an RM program" 1>&2
3527 for file in $files; do
3528 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3529 test "X$dir" = "X$file" && dir
=.
3530 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3536 # Possibly a libtool archive, so verify it.
3537 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
3540 # Delete the libtool libraries and symlinks.
3541 for n
in $library_names; do
3542 rmfiles
="$rmfiles $dir/$n"
3543 test "X$n" = "X$dlname" && dlname
=
3545 test -n "$dlname" && rmfiles
="$rmfiles $dir/$dlname"
3546 test -n "$old_library" && rmfiles
="$rmfiles $dir/$old_library"
3548 $show "$rm $rmfiles"
3551 if test -n "$library_names"; then
3552 # Do each command in the postuninstall commands.
3553 eval cmds
=\"$postuninstall_cmds\"
3554 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3555 for cmd
in $cmds; do
3563 if test -n "$old_library"; then
3564 # Do each command in the old_postuninstall commands.
3565 eval cmds
=\"$old_postuninstall_cmds\"
3566 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3567 for cmd
in $cmds; do
3575 # FIXME: should reinstall the best remaining shared library.
3580 if test "$build_old_libs" = yes; then
3581 oldobj
=`$echo "X$name" | $Xsed -e "$lo2o"`
3582 rmfiles
="$rmfiles $dir/$oldobj"
3584 $show "$rm $rmfiles"
3589 $show "$rm $rmfiles"
3598 $echo "$modename: you must specify a MODE" 1>&2
3599 $echo "$generic_help" 1>&2
3604 $echo "$modename: invalid operation mode \`$mode'" 1>&2
3605 $echo "$generic_help" 1>&2
3607 fi # test -z "$show_help"
3609 # We need to display help for each of the modes.
3612 "Usage: $modename [OPTION]... [MODE-ARG]...
3614 Provide generalized library-building support services.
3616 --config show all configuration variables
3617 --debug enable verbose shell tracing
3618 -n, --dry-run display commands without modifying any files
3619 --features display basic configuration information and exit
3620 --finish same as \`--mode=finish'
3621 --help display this help message and exit
3622 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
3623 --quiet same as \`--silent'
3624 --silent don't print informational messages
3625 --version print version information
3627 MODE must be one of the following:
3629 compile compile a source file into a libtool object
3630 execute automatically set library path, then run a program
3631 finish complete the installation of libtool libraries
3632 install install libraries or executables
3633 link create a library or an executable
3634 uninstall remove libraries from an installed directory
3636 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
3637 a more detailed description of MODE."
3643 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
3645 Compile a source file into a libtool library object.
3647 This mode accepts the following additional options:
3649 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3650 -static always build a \`.o' file suitable for static linking
3652 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
3653 from the given SOURCEFILE.
3655 The output file name is determined by removing the directory component from
3656 SOURCEFILE, then substituting the C source code suffix \`.c' with the
3657 library object suffix, \`.lo'."
3662 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
3664 Automatically set library path, then run a program.
3666 This mode accepts the following additional options:
3668 -dlopen FILE add the directory containing FILE to the library path
3670 This mode sets the library path environment variable according to \`-dlopen'
3673 If any of the ARGS are libtool executable wrappers, then they are translated
3674 into their corresponding uninstalled binary, and any of their required library
3675 directories are added to the library path.
3677 Then, COMMAND is executed, with ARGS as arguments."
3682 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
3684 Complete the installation of libtool libraries.
3686 Each LIBDIR is a directory that contains libtool libraries.
3688 The commands that this mode executes may require superuser privileges. Use
3689 the \`--dry-run' option if you just want to see what would be executed."
3694 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
3696 Install executables or libraries.
3698 INSTALL-COMMAND is the installation command. The first component should be
3699 either the \`install' or \`cp' program.
3701 The rest of the components are interpreted as arguments to that command (only
3702 BSD-compatible install options are recognized)."
3707 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
3709 Link object files or libraries together to form another library, or to
3710 create an executable program.
3712 LINK-COMMAND is a command using the C compiler that you would use to create
3713 a program from several object files.
3715 The following components of LINK-COMMAND are treated specially:
3717 -all-static do not do any dynamic linking at all
3718 -avoid-version do not add a version suffix if possible
3719 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
3720 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
3721 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
3722 -export-symbols SYMFILE
3723 try to export only the symbols listed in SYMFILE
3724 -LLIBDIR search LIBDIR for required installed libraries
3725 -lNAME OUTPUT-FILE requires the installed library libNAME
3726 -module build a library that can dlopened
3727 -no-undefined declare that a library does not refer to external symbols
3728 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
3729 -release RELEASE specify package release information
3730 -rpath LIBDIR the created library will eventually be installed in LIBDIR
3731 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
3732 -static do not do any dynamic linking of libtool libraries
3733 -version-info CURRENT[:REVISION[:AGE]]
3734 specify library version info [each variable defaults to 0]
3736 All other options (arguments beginning with \`-') are ignored.
3738 Every other argument is treated as a filename. Files ending in \`.la' are
3739 treated as uninstalled libtool libraries, other files are standard or library
3742 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
3743 only library objects (\`.lo' files) may be specified, and \`-rpath' is
3744 required, except when creating a convenience library.
3746 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
3747 using \`ar' and \`ranlib', or on Windows using \`lib'.
3749 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
3750 is created, otherwise an executable program is created."
3755 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
3757 Remove libraries from an installation directory.
3759 RM is the name of the program to use to delete files associated with each FILE
3760 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
3763 If FILE is a libtool library, all the files associated with it are deleted.
3764 Otherwise, only FILE itself is deleted using RM."
3768 $echo "$modename: invalid operation mode \`$mode'" 1>&2
3775 $echo "Try \`$modename --help' for more information about other modes."