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"
799 if test -n "$shlibpath_var"; then
800 # get the directories listed in $shlibpath_var
801 eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
805 # now prepend the system-specific ones
806 eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
807 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
815 export_symbols_regex=
818 link_against_libtool_libs=
833 # We need to know -static, to get the right output filenames.
837 -all-static | -static)
838 if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
839 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
841 build_libtool_libs=no
848 # See if our shared archives depend on static archives.
849 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
851 # Go through the arguments, transforming them on the way.
852 while test $# -gt 0; do
856 # If the previous option needs an argument, assign it.
857 if test -n "$prev"; then
860 compile_command="$compile_command @OUTPUT@"
861 finalize_command="$finalize_command @OUTPUT@"
867 if test "$preload" = no; then
868 # Add the symbol object into the linking commands.
869 compile_command="$compile_command @SYMFILE@"
870 finalize_command="$finalize_command @SYMFILE@"
874 *.la | *.lo) ;; # We handle these cases below.
876 if test "$prev" = dlprefiles; then
878 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
885 dlprefiles="$dlprefiles $arg"
886 test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
892 export_symbols="$arg"
893 if test ! -f "$arg"; then
894 $echo "$modename: symbol file \`$arg' does not exist"
901 export_symbols_regex="$arg"
916 xrpath="$xrpath $arg"
921 compiler_flags="$compiler_flags -$prev$qarg"
923 compile_command="$compile_command -$prev$qarg"
924 finalize_command="$finalize_command -$prev$qarg"
928 eval "$prev=\"\$arg\""
939 if test -n "$link_static_flag"; then
940 compile_command="$compile_command $link_static_flag"
941 finalize_command="$finalize_command $link_static_flag"
942 dlopen_self=$dlopen_self_static
948 # FIXME: remove this flag sometime in the future.
949 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
969 if test "$export_dynamic" != yes; then
971 if test -n "$export_dynamic_flag_spec"; then
972 eval arg=\"$export_dynamic_flag_spec\"
979 -export-symbols | -export-symbols-regex)
980 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
981 $echo "$modename: cannot have more than one -exported-symbols"
984 if test "$arg" = "-export-symbols"; then
993 dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
995 /* | [A-Za-z]:[/\\]*)
996 # Add the corresponding hardcode_libdir_flag, if it is not identical.
999 $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
1003 case " $deplibs " in
1005 *) deplibs="$deplibs $arg";;
1007 case " $lib_search_path " in
1009 *) lib_search_path="$lib_search_path $dir";;
1012 *-*-cygwin* | *-*-mingw* | *-*-os2*)
1013 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
1014 case ":$dllsearchpath:" in
1015 ::) dllsearchpath="$dllsearchdir";;
1016 *":$dllsearchdir:"*) ;;
1017 *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
1024 deplibs="$deplibs $arg"
1028 if test "$module" != yes; then
1030 if test -n "$export_dynamic_flag_spec"; then
1031 eval arg=\"$export_dynamic_flag_spec\"
1061 xrpath="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'`
1066 # If we have no pic_flag, then this is the same as -all-static.
1067 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1068 compile_command="$compile_command $link_static_flag"
1069 finalize_command="$finalize_command $link_static_flag"
1070 dlopen_self=$dlopen_self_static
1085 # Some other compiler flag.
1087 if test "X$extra_compiler_flags_value" != "X"; then
1088 is_extra_compiler_flag=
1089 eval "case \"\$arg\" in \
1090 $extra_compiler_flags_value) \
1091 is_extra_compiler_flag=yes ;; \
1093 if test "$is_extra_compiler_flag"; then
1094 prev=`echo "X$arg" | $Xsed -e 's/^-//'`
1098 # Unknown arguments in both finalize_command and compile_command need
1099 # to be aesthetically quoted because they are evaled later.
1100 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1102 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1106 if test "X$extra_compiler_flags" != "X"; then
1107 is_extra_compiler_flag=
1108 eval "case \"\$arg\" in \
1109 $extra_compiler_flags) \
1110 is_extra_compiler_flag=yes ;; \
1112 if test "$is_extra_compiler_flag"; then
1113 compiler_flags="$compiler_flags $arg"
1118 *.o | *.obj | *.a | *.lib)
1119 # A standard object.
1125 if test "$prev" = dlfiles; then
1126 dlfiles="$dlfiles $arg"
1127 if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
1131 # If libtool objects are unsupported, then we need to preload.
1136 if test "$prev" = dlprefiles; then
1137 # Preload the old-style object.
1138 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1141 libobjs="$libobjs $arg"
1145 # A libtool-controlled library.
1152 # Check to see that this really is a libtool archive.
1153 if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1155 $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
1159 # If the library was installed with an old release of libtool,
1160 # it will not redefine variable installed.
1163 # If there is no directory component, then add one.
1165 */* | *\\*) . $arg ;;
1169 # Get the name of the library we link against.
1171 for l in $old_library $library_names; do
1175 if test -z "$linklib"; then
1176 $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
1180 # Find the relevant object directory and library name.
1181 name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
1183 if test "X$installed" = Xyes; then
1186 dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1187 if test "X$dir" = "X$arg"; then
1194 if test -n "$dependency_libs"; then
1195 # Extract -R from dependency_libs
1197 for deplib in $dependency_libs; do
1199 -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1200 case " $rpath $xrpath " in
1201 *" $temp_xrpath "*) ;;
1202 *) xrpath="$xrpath $temp_xrpath";;
1204 -L*) case "$compile_command $temp_deplibs " in
1206 *) temp_deplibs="$temp_deplibs $deplib";;
1208 *) temp_deplibs="$temp_deplibs $deplib";;
1211 dependency_libs="$temp_deplibs"
1214 if test -z "$libdir"; then
1215 # It is a libtool convenience library, so add in its objects.
1216 convenience="$convenience $dir/$old_library"
1217 old_convenience="$old_convenience $dir/$old_library"
1218 deplibs="$deplibs$dependency_libs"
1219 compile_command="$compile_command $dir/$old_library$dependency_libs"
1220 finalize_command="$finalize_command $dir/$old_library$dependency_libs"
1224 # This library was specified with -dlopen.
1225 if test "$prev" = dlfiles; then
1226 dlfiles="$dlfiles $arg"
1227 if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
1228 # If there is no dlname, no dlopen support or we're linking statically,
1229 # we need to preload.
1232 # We should not create a dependency on this library, but we
1233 # may need any libraries it requires.
1234 compile_command="$compile_command$dependency_libs"
1235 finalize_command="$finalize_command$dependency_libs"
1241 # The library was specified with -dlpreopen.
1242 if test "$prev" = dlprefiles; then
1243 # Prefer using a static library (so that no silly _DYNAMIC symbols
1244 # are required to link).
1245 if test -n "$old_library"; then
1246 dlprefiles="$dlprefiles $dir/$old_library"
1248 dlprefiles="$dlprefiles $dir/$linklib"
1253 if test "$build_libtool_libs" = yes && test -n "$library_names"; then
1254 link_against_libtool_libs="$link_against_libtool_libs $arg"
1255 if test -n "$shlibpath_var"; then
1256 # Make sure the rpath contains only unique directories.
1257 case "$temp_rpath " in
1259 *) temp_rpath="$temp_rpath $dir" ;;
1263 # We need an absolute path.
1265 /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
1267 absdir=`cd "$dir" && pwd`
1268 if test -z "$absdir"; then
1269 $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
1275 # This is the magic to use -rpath.
1276 # Skip directories that are in the system default run-time
1277 # search path, unless they have been requested with -R.
1278 case " $sys_lib_dlsearch_path " in
1281 case "$compile_rpath " in
1283 *) compile_rpath="$compile_rpath $absdir"
1288 case " $sys_lib_dlsearch_path " in
1291 case "$finalize_rpath " in
1293 *) finalize_rpath="$finalize_rpath $libdir"
1299 case "$hardcode_action" in
1300 immediate | unsupported)
1301 if test "$hardcode_direct" = no; then
1302 compile_command="$compile_command $dir/$linklib"
1303 deplibs="$deplibs $dir/$linklib"
1305 *-*-cygwin* | *-*-mingw* | *-*-os2*)
1306 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
1307 if test -n "$dllsearchpath"; then
1308 dllsearchpath="$dllsearchpath:$dllsearchdir"
1310 dllsearchpath="$dllsearchdir"
1314 elif test "$hardcode_minus_L" = no; then
1317 compile_shlibpath="$compile_shlibpath$dir:"
1320 case "$compile_command " in
1322 *) compile_command="$compile_command -L$dir";;
1324 compile_command="$compile_command -l$name"
1325 deplibs="$deplibs -L$dir -l$name"
1326 elif test "$hardcode_shlibpath_var" = no; then
1327 case ":$compile_shlibpath:" in
1329 *) compile_shlibpath="$compile_shlibpath$dir:";;
1331 compile_command="$compile_command -l$name"
1332 deplibs="$deplibs -l$name"
1339 if test "$hardcode_direct" = yes; then
1340 compile_command="$compile_command $absdir/$linklib"
1341 deplibs="$deplibs $absdir/$linklib"
1342 elif test "$hardcode_minus_L" = yes; then
1343 case "$compile_command " in
1345 *) compile_command="$compile_command -L$absdir";;
1347 compile_command="$compile_command -l$name"
1348 deplibs="$deplibs -L$absdir -l$name"
1349 elif test "$hardcode_shlibpath_var" = yes; then
1350 case ":$compile_shlibpath:" in
1352 *) compile_shlibpath="$compile_shlibpath$absdir:";;
1354 compile_command="$compile_command -l$name"
1355 deplibs="$deplibs -l$name"
1366 if test "$lib_linked" != yes; then
1367 $echo "$modename: configuration error: unsupported hardcode properties"
1371 # Finalize command for both is simple: just hardcode it.
1372 if test "$hardcode_direct" = yes; then
1373 finalize_command="$finalize_command $libdir/$linklib"
1374 elif test "$hardcode_minus_L" = yes; then
1375 case "$finalize_command " in
1377 *) finalize_command="$finalize_command -L$libdir";;
1379 finalize_command="$finalize_command -l$name"
1380 elif test "$hardcode_shlibpath_var" = yes; then
1381 case ":$finalize_shlibpath:" in
1383 *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
1385 finalize_command="$finalize_command -l$name"
1387 # We cannot seem to hardcode it, guess we'll fake it.
1388 case "$finalize_command " in
1390 *) finalize_command="$finalize_command -L$libdir";;
1392 finalize_command="$finalize_command -l$name"
1395 # Transform directly to old archives if we don't build new libraries.
1396 if test -n "$pic_flag" && test -z "$old_library"; then
1397 $echo "$modename: cannot find static library for \`$arg'" 1>&2
1401 # Here we assume that one of hardcode_direct or hardcode_minus_L
1402 # is not unsupported. This is valid on all known static and
1404 if test "$hardcode_direct" != unsupported; then
1405 test -n "$old_library" && linklib="$old_library"
1406 compile_command="$compile_command $dir/$linklib"
1407 finalize_command="$finalize_command $dir/$linklib"
1409 case "$compile_command " in
1411 *) compile_command="$compile_command -L$dir";;
1413 compile_command="$compile_command -l$name"
1414 case "$finalize_command " in
1416 *) finalize_command="$finalize_command -L$dir";;
1418 finalize_command="$finalize_command -l$name"
1422 # Add in any libraries that this one depends upon.
1423 compile_command="$compile_command$dependency_libs"
1424 finalize_command="$finalize_command$dependency_libs"
1428 # Some other compiler argument.
1430 # Unknown arguments in both finalize_command and compile_command need
1431 # to be aesthetically quoted because they are evaled later.
1432 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1434 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1441 # Now actually substitute the argument into the commands.
1442 if test -n "$arg"; then
1443 compile_command="$compile_command $arg"
1444 finalize_command="$finalize_command $arg"
1448 if test -n "$prev"; then
1449 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1455 # calculate the name of the file, without its directory
1456 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1457 libobjs_save="$libobjs"
1461 $echo "$modename: you must specify an output file" 1>&2
1467 if test -n "$link_against_libtool_libs"; then
1468 $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
1472 if test -n "$deplibs"; then
1473 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
1476 if test -n "$dlfiles$dlprefiles"; then
1477 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
1480 if test -n "$rpath"; then
1481 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
1484 if test -n "$xrpath"; then
1485 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
1488 if test -n "$vinfo"; then
1489 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
1492 if test -n "$release"; then
1493 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
1496 if test -n "$export_symbols"; then
1497 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
1500 # Now set the variables for building old libraries.
1501 build_libtool_libs=no
1506 # Make sure we only generate libraries of the form `libNAME.la'.
1507 case "$outputname" in
1509 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1510 eval libname=\"$libname_spec\"
1513 if test "$module" = no; then
1514 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
1518 if test "$need_lib_prefix" != no; then
1519 # Add the "lib" prefix for modules if required
1520 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1521 eval libname=\"$libname_spec\"
1523 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1528 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1529 if test "X$output_objdir" = "X$output"; then
1530 output_objdir="$objdir"
1532 output_objdir="$output_objdir/$objdir"
1535 # All the library-specific variables (install_libdir is set above).
1540 if test -n "$objs"; then
1541 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
1545 # How the heck are we supposed to write a wrapper for a shared library?
1546 if test -n "$link_against_libtool_libs"; then
1547 $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
1551 if test -n "$dlfiles$dlprefiles"; then
1552 $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
1556 if test $# -gt 2; then
1557 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
1562 if test -z "$rpath"; then
1563 if test "$build_libtool_libs" = yes; then
1564 # Building a libtool convenience library.
1566 oldlibs="$output_objdir/$libname.$libext $oldlibs"
1567 build_libtool_libs=convenience
1570 dependency_libs="$deplibs"
1572 if test -n "$vinfo"; then
1573 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
1576 if test -n "$release"; then
1577 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
1581 # Parse the version information argument.
1582 IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
1583 set dummy $vinfo 0 0 0
1586 if test -n "$8"; then
1587 $echo "$modename: too many parameters to \`-version-info'" 1>&2
1596 # Check that each of the things are valid numbers.
1598 0 | [1-9] | [1-9][0-9]*) ;;
1600 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
1601 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1607 0 | [1-9] | [1-9][0-9]*) ;;
1609 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
1610 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1616 0 | [1-9] | [1-9][0-9]*) ;;
1618 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
1619 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1624 if test $age -gt $current; then
1625 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
1626 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1630 # Calculate the version variables.
1634 case "$version_type" in
1638 major=`expr $current - $age + 1`
1639 versuffix="$major.$revision"
1640 verstring="sgi$major.$revision"
1642 # Add in all the interfaces that we are compatible with.
1644 while test $loop != 0; do
1645 iface=`expr $revision - $loop`
1646 loop=`expr $loop - 1`
1647 verstring="sgi$major.$iface:$verstring"
1652 major=.`expr $current - $age`
1653 versuffix="$major.$age.$revision"
1657 major=`expr $current - $age`
1658 versuffix=".$current.$age.$revision"
1659 verstring="$current.$age.$revision"
1661 # Add in all the interfaces that we are compatible with.
1663 while test $loop != 0; do
1664 iface=`expr $current - $loop`
1665 loop=`expr $loop - 1`
1666 verstring="$verstring:${iface}.0"
1669 # Make executables depend on our current version.
1670 verstring="$verstring:${current}.0"
1675 versuffix=".$current.$revision"
1680 versuffix=".$current.$revision";
1685 versuffix=".$current";
1689 # Like Linux, but with '-' rather than '.', since we only
1690 # want one extension on Windows 95.
1691 major=`expr $current - $age`
1692 versuffix="-$major-$age-$revision"
1696 $echo "$modename: unknown library version type \`$version_type'" 1>&2
1697 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
1702 # Clear the version info if we defaulted, and they specified a release.
1703 if test -z "$vinfo" && test -n "$release"; then
1706 if test "$need_version" = no; then
1713 # Remove version info from name if versioning should be avoided
1714 if test "$avoid_version" = yes && test "$need_version" = no; then
1720 # Check to see if the archive will have undefined symbols.
1721 if test "$allow_undefined" = yes; then
1722 if test "$allow_undefined_flag" = unsupported; then
1723 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
1724 build_libtool_libs=no
1728 # Don't allow undefined symbols.
1729 allow_undefined_flag="$no_undefined_flag"
1732 dependency_libs="$deplibs"
1734 *-*-cygwin* | *-*-mingw* | *-*-os2*)
1735 # these systems don't actually have a c library (as such)!
1738 # Add libc to deplibs on all other systems.
1739 deplibs="$deplibs -lc"
1744 # Create the output directory, or remove our outputs if we need to.
1745 if test -d $output_objdir; then
1746 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
1747 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
1749 $show "$mkdir $output_objdir"
1750 $run $mkdir $output_objdir
1752 if test $status -ne 0 && test ! -d $output_objdir; then
1757 # Now set the variables for building old libraries.
1758 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
1759 oldlibs="$oldlibs $output_objdir/$libname.$libext"
1761 # Transform .lo files to .o files.
1762 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
1765 if test "$build_libtool_libs" = yes; then
1766 # Transform deplibs into only deplibs that can be linked in shared.
1768 libname_save=$libname
1769 release_save=$release
1770 versuffix_save=$versuffix
1772 # I'm not sure if I'm treating the release correctly. I think
1773 # release should show up in the -l (ie -lgmp5) so we don't want to
1774 # add it in twice. Is that correct?
1780 case "$deplibs_check_method" in
1783 ;; # Don't check for shared/static. Everything works.
1784 # This might be a little naive. We might want to check
1785 # whether the library exists or not. But this is on
1786 # osf3 & osf4 and I'm not really sure... Just
1787 # implementing what was already the behaviour.
1789 # This code stresses the "libraries are programs" paradigm to its
1790 # limits. Maybe even breaks it. We compile a program, linking it
1791 # against the deplibs as a proxy for the library. Then we can check
1792 # whether they linked in statically or dynamically with ldd.
1794 cat > conftest.c <<EOF
1795 int main() { return 0; }
1798 $C_compiler -o conftest conftest.c $deplibs
1799 if test $? -eq 0 ; then
1800 ldd_output=`ldd conftest`
1801 for i in $deplibs; do
1802 name="`expr $i : '-l\(.*\)'`"
1803 # If $name is empty we are operating on a -L argument.
1804 if test "$name" != "" ; then
1805 libname=`eval \\$echo \"$libname_spec\"`
1806 deplib_matches=`eval \\$echo \"$library_names_spec\"`
1807 set dummy $deplib_matches
1809 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
1810 newdeplibs="$newdeplibs $i"
1814 echo "*** Warning: This library needs some functionality provided by $i."
1815 echo "*** I have the capability to make that library automatically link in when"
1816 echo "*** you link to this library. But I can only do this if you have a"
1817 echo "*** shared version of the library, which you do not appear to have."
1820 newdeplibs="$newdeplibs $i"
1824 # Error occured in the first compile. Let's try to salvage the situation:
1825 # Compile a seperate program for each library.
1826 for i in $deplibs; do
1827 name="`expr $i : '-l\(.*\)'`"
1828 # If $name is empty we are operating on a -L argument.
1829 if test "$name" != "" ; then
1831 $C_compiler -o conftest conftest.c $i
1833 if test $? -eq 0 ; then
1834 ldd_output=`ldd conftest`
1835 libname=`eval \\$echo \"$libname_spec\"`
1836 deplib_matches=`eval \\$echo \"$library_names_spec\"`
1837 set dummy $deplib_matches
1839 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
1840 newdeplibs="$newdeplibs $i"
1844 echo "*** Warning: This library needs some functionality provided by $i."
1845 echo "*** I have the capability to make that library automatically link in when"
1846 echo "*** you link to this library. But I can only do this if you have a"
1847 echo "*** shared version of the library, which you do not appear to have."
1852 echo "*** Warning! Library $i is needed by this library but I was not able to"
1853 echo "*** make it link in! You will probably need to install it or some"
1854 echo "*** library that it depends on before this library will be fully"
1855 echo "*** functional. Installing it before continuing would be even better."
1858 newdeplibs="$newdeplibs $i"
1865 set dummy $deplibs_check_method
1866 file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
1867 for a_deplib in $deplibs; do
1868 name="`expr $a_deplib : '-l\(.*\)'`"
1869 # If $name is empty we are operating on a -L argument.
1870 if test "$name" != "" ; then
1871 libname=`eval \\$echo \"$libname_spec\"`
1872 for i in $lib_search_path; do
1873 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
1874 for potent_lib in $potential_libs; do
1875 # Follow soft links.
1876 if ls -lLd "$potlib" 2>/dev/null \
1877 | grep " -> " >/dev/null; then
1880 # The statement above tries to avoid entering an
1881 # endless loop below, in case of cyclic links.
1882 # We might still enter an endless loop, since a link
1883 # loop can be closed while we follow links,
1885 potlib="$potent_lib"
1886 while test -h "$potlib" 2>/dev/null; do
1887 potliblink=`ls -ld $potlib | sed 's/.* -> //'`
1888 case "$potliblink" in
1889 /*) potlib="$potliblink";;
1890 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
1893 if eval $file_magic_cmd \"\$potlib\" \
1895 | egrep "$file_magic_regex" > /dev/null; then
1896 newdeplibs="$newdeplibs $a_deplib"
1902 if test -n "$a_deplib" ; then
1905 echo "*** Warning: This library needs some functionality provided by $a_deplib."
1906 echo "*** I have the capability to make that library automatically link in when"
1907 echo "*** you link to this library. But I can only do this if you have a"
1908 echo "*** shared version of the library, which you do not appear to have."
1911 # Add a -L argument.
1912 newdeplibs="$newdeplibs $a_deplib"
1914 done # Gone through all deplibs.
1916 none | unknown | *) newdeplibs=""
1917 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
1918 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
1919 grep . >/dev/null; then
1921 if test "X$deplibs_check_method" = "Xnone"; then
1922 echo "*** Warning: inter-library dependencies are not supported in this platform."
1924 echo "*** Warning: inter-library dependencies are not known to be supported."
1926 echo "*** All declared inter-library dependencies are being dropped."
1931 versuffix=$versuffix_save
1933 release=$release_save
1934 libname=$libname_save
1937 if test "$droppeddeps" = yes; then
1938 if test "$module" = yes; then
1940 echo "*** Warning: libtool could not satisfy all declared inter-library"
1941 echo "*** dependencies of module $libname. Therefore, libtool will create"
1942 echo "*** a static module, that should work as long as the dlopening"
1943 echo "*** application is linked with the -dlopen flag."
1944 if test -z "$global_symbol_pipe"; then
1946 echo "*** However, this would only work if libtool was able to extract symbol"
1947 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
1948 echo "*** not find such a program. So, this module is probably useless."
1949 echo "*** \`nm' from GNU binutils and a full rebuild may help."
1951 if test "$build_old_libs" = no; then
1952 oldlibs="$output_objdir/$libname.$libext"
1953 build_libtool_libs=module
1956 build_libtool_libs=no
1961 echo "*** The inter-library dependencies that have been dropped here will be"
1962 echo "*** automatically added whenever a program is linked with this library"
1963 echo "*** or is declared to -dlopen it."
1968 # test again, we may have decided not to build it any more
1969 if test "$build_libtool_libs" = yes; then
1971 # Done checking deplibs!
1973 # Get the real and link names of the library.
1974 eval library_names=\"$library_names_spec\"
1975 set dummy $library_names
1979 if test -n "$soname_spec"; then
1980 eval soname=\"$soname_spec\"
1985 lib="$output_objdir/$realname"
1988 linknames="$linknames $link"
1991 # Ensure that we have .o objects for linkers which dislike .lo
1992 # (e.g. aix) incase we are running --disable-static
1993 for obj in $libobjs; do
1994 oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
1995 test -f $oldobj || ${LN_S} $obj $oldobj
1998 # Use standard objects if they are pic
1999 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2001 if test -n "$whole_archive_flag_spec"; then
2002 if test -n "$convenience"; then
2003 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
2006 for xlib in $convenience; do
2007 # Extract the objects.
2009 generated="$generated $xdir"
2010 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2012 $show "${rm}r $xdir"
2017 if test $status -ne 0 && test ! -d "$xdir"; then
2020 $show "(cd $xdir && $AR x ../$xlib)"
2021 $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
2023 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2027 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
2028 eval flag=\"$thread_safe_flag_spec\"
2030 linkopts="$linkopts $flag"
2033 # Prepare the list of exported symbols
2034 if test -z "$export_symbols"; then
2035 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
2036 $show "generating symbol list for \`$libname.la'"
2037 export_symbols="$objdir/$libname.exp"
2038 $run $rm $export_symbols
2039 eval cmds=\"$export_symbols_cmds\"
2040 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2041 for cmd in $cmds; do
2044 $run eval "$cmd" || exit $?
2047 if test -n "$export_symbols_regex"; then
2048 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
2049 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
2050 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
2051 $run eval '$mv "${export_symbols}T" "$export_symbols"'
2056 if test -n "$export_symbols" && test -n "$include_expsyms"; then
2057 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
2060 # Do each of the archive commands.
2061 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2062 eval cmds=\"$archive_expsym_cmds\"
2064 eval cmds=\"$archive_cmds\"
2066 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2067 for cmd in $cmds; do
2070 $run eval "$cmd" || exit $?
2074 # Create links to the real library.
2075 for linkname in $linknames; do
2076 if test "$realname" != "$linkname"; then
2077 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
2078 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
2082 # If -module or -export-dynamic was specified, set the dlname.
2083 if test "$module" = yes || test "$export_dynamic" = yes; then
2084 # On all known operating systems, these are identical.
2091 if test -n "$link_against_libtool_libs"; then
2092 $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
2096 if test -n "$deplibs"; then
2097 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
2100 if test -n "$dlfiles$dlprefiles"; then
2101 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
2104 if test -n "$rpath"; then
2105 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
2108 if test -n "$xrpath"; then
2109 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
2112 if test -n "$vinfo"; then
2113 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
2116 if test -n "$release"; then
2117 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
2122 if test -n "$objs"; then
2123 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
2127 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
2135 # Delete the old objects.
2136 $run $rm $obj $libobj
2138 # Create the old-style object.
2139 reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
2142 eval cmds=\"$reload_cmds\"
2143 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2144 for cmd in $cmds; do
2147 $run eval "$cmd" || exit $?
2151 # Exit if we aren't doing a library object file.
2152 test -z "$libobj" && exit 0
2154 if test "$build_libtool_libs" != yes; then
2155 # Create an invalid libtool object if no PIC, so that we don't
2156 # accidentally link it into a program.
2157 $show "echo timestamp > $libobj"
2158 $run eval "echo timestamp > $libobj" || exit $?
2162 if test -n "$pic_flag"; then
2163 # Only do commands if we really have different PIC objects.
2164 reload_objs="$libobjs"
2166 eval cmds=\"$reload_cmds\"
2167 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2168 for cmd in $cmds; do
2171 $run eval "$cmd" || exit $?
2175 # Just create a symlink.
2178 $show "$LN_S $obj $libobj"
2179 $run $LN_S $obj $libobj || exit $?
2185 # Anything else should be a program.
2187 if test -n "$vinfo"; then
2188 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
2191 if test -n "$release"; then
2192 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
2195 if test "$preload" = yes; then
2196 if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
2197 test "$dlopen_self_static" = unknown; then
2198 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
2202 if test "$dlself" = yes && test "$export_dynamic" = no; then
2203 $echo "$modename: error: \`-dlopen self' requires \`-export-dynamic'" 1>&2
2207 if test -n "$rpath$xrpath"; then
2208 # If the user specified any rpath flags, then add them.
2209 for libdir in $rpath $xrpath; do
2210 # This is the magic to use -rpath.
2211 case "$compile_rpath " in
2213 *) compile_rpath="$compile_rpath $libdir" ;;
2215 case "$finalize_rpath " in
2217 *) finalize_rpath="$finalize_rpath $libdir" ;;
2222 # Now hardcode the library paths
2225 for libdir in $compile_rpath $finalize_rpath; do
2226 if test -n "$hardcode_libdir_flag_spec"; then
2227 if test -n "$hardcode_libdir_separator"; then
2228 if test -z "$hardcode_libdirs"; then
2229 hardcode_libdirs="$libdir"
2231 # Just accumulate the unique libdirs.
2232 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2233 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2236 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2241 eval flag=\"$hardcode_libdir_flag_spec\"
2243 rpath="$rpath $flag"
2245 elif test -n "$runpath_var"; then
2246 case "$perm_rpath " in
2248 *) perm_rpath="$perm_rpath $libdir" ;;
2252 # Substitute the hardcoded libdirs into the rpath.
2253 if test -n "$hardcode_libdir_separator" &&
2254 test -n "$hardcode_libdirs"; then
2255 libdir="$hardcode_libdirs"
2256 eval rpath=\" $hardcode_libdir_flag_spec\"
2258 compile_rpath="$rpath"
2262 for libdir in $finalize_rpath; do
2263 if test -n "$hardcode_libdir_flag_spec"; then
2264 if test -n "$hardcode_libdir_separator"; then
2265 if test -z "$hardcode_libdirs"; then
2266 hardcode_libdirs="$libdir"
2268 # Just accumulate the unique libdirs.
2269 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2270 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2273 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2278 eval flag=\"$hardcode_libdir_flag_spec\"
2280 rpath="$rpath $flag"
2282 elif test -n "$runpath_var"; then
2283 case "$finalize_perm_rpath " in
2285 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
2289 # Substitute the hardcoded libdirs into the rpath.
2290 if test -n "$hardcode_libdir_separator" &&
2291 test -n "$hardcode_libdirs"; then
2292 libdir="$hardcode_libdirs"
2293 eval rpath=\" $hardcode_libdir_flag_spec\"
2295 finalize_rpath="$rpath"
2297 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2298 if test "X$output_objdir" = "X$output"; then
2299 output_objdir="$objdir"
2301 output_objdir="$output_objdir/$objdir"
2304 if test -n "$libobjs" && test "$build_old_libs" = yes; then
2305 # Transform all the library objects into standard objects.
2306 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2307 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2311 if test -n "$dlfiles$dlprefiles" || test "$dlself" = yes; then
2312 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2313 dlsyms="${outputname}S.c"
2315 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
2319 if test -n "$dlsyms"; then
2323 # Discover the nlist of each of the dlfiles.
2324 nlist="$objdir/${output}.nm"
2326 if test -d $objdir; then
2327 $show "$rm $nlist ${nlist}S ${nlist}T"
2328 $run $rm "$nlist" "${nlist}S" "${nlist}T"
2330 $show "$mkdir $objdir"
2333 if test $status -ne 0 && test ! -d $objdir; then
2338 # Parse the name list into a source file.
2339 $show "creating $objdir/$dlsyms"
2341 $echo > "$objdir/$dlsyms" "\
2342 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
2343 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
2349 /* Prevent the only kind of declaration conflicts we can make. */
2350 #define lt_preloaded_symbols some_other_symbol
2352 /* External symbol declarations for the compiler. */\
2355 if test "$dlself" = yes; then
2356 $show "generating symbol list for \`$output'"
2358 echo ': @PROGRAM@ ' > "$nlist"
2360 # Add our own program objects to the symbol list.
2361 progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2362 for arg in $progfiles; do
2363 $show "extracting global C symbols from \`$arg'"
2364 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2367 if test -n "$exclude_expsyms"; then
2368 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
2369 $run eval '$mv "$nlist"T "$nlist"'
2372 if test -n "$export_symbols_regex"; then
2373 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
2374 $run eval '$mv "$nlist"T "$nlist"'
2377 # Prepare the list of exported symbols
2378 if test -z "$export_symbols"; then
2379 export_symbols="$objdir/$output.exp"
2380 $run $rm $export_symbols
2381 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2383 $run $rm $export_symbols
2384 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$objdir/$output.exp"'
2385 $run eval 'grep -f "$objdir/$output.exp" < "$nlist" > "$nlist"T'
2386 $run eval 'mv "$nlist"T "$nlist"'
2390 for arg in $dlprefiles; do
2391 $show "extracting global C symbols from \`$arg'"
2392 name=`echo "$arg" | sed -e 's%^.*/%%'`
2393 $run eval 'echo ": $name " >> "$nlist"'
2394 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2397 if test -z "$run"; then
2398 # Make sure we have at least an empty file.
2399 test -f "$nlist" || : > "$nlist"
2401 if test -n "$exclude_expsyms"; then
2402 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2403 $mv "$nlist"T "$nlist"
2406 # Try sorting and uniquifying the output.
2407 if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
2410 grep -v "^: " < "$nlist" > "$nlist"S
2413 if test -f "$nlist"S; then
2414 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
2416 echo '/* NONE */' >> "$output_objdir/$dlsyms"
2419 $echo >> "$output_objdir/$dlsyms" "\
2421 #undef lt_preloaded_symbols
2423 #if defined (__STDC__) && __STDC__
2424 # define lt_ptr_t void *
2426 # define lt_ptr_t char *
2430 /* The mapping between symbol names and symbols. */
2435 lt_preloaded_symbols[] =
2439 sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
2440 -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
2441 < "$nlist" >> "$output_objdir/$dlsyms"
2443 $echo >> "$output_objdir/$dlsyms" "\
2447 /* This works around a problem in FreeBSD linker */
2448 #ifdef FREEBSD_WORKAROUND
2449 static const void *lt_preloaded_setup() {
2450 return lt_preloaded_symbols;
2460 pic_flag_for_symtable=
2462 # compiling the symbol table file with pic_flag works around
2463 # a FreeBSD bug that causes programs to crash when -lm is
2464 # linked before any other PIC object. But we must not use
2465 # pic_flag when linking with -static. The problem exists in
2466 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2467 *-*-freebsd2*|*-*-freebsd3.0*)
2468 case "$compile_command " in
2470 *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
2474 # Now compile the dynamic symbol file.
2475 $show "(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
2476 $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
2478 # Transform the symbol file into the correct name.
2479 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
2480 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
2483 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
2488 # We keep going just in case the user didn't refer to
2489 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
2490 # really was required.
2492 # Nullify the symbol file.
2493 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2494 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2497 if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
2498 # Replace the output file specification.
2499 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
2500 link_command="$compile_command$compile_rpath"
2502 # We have no uninstalled library dependencies, so finalize right now.
2503 $show "$link_command"
2504 $run eval "$link_command"
2508 if test -n "$shlibpath_var"; then
2509 # We should set the shlibpath_var
2511 for dir in $temp_rpath; do
2513 /* | [A-Za-z]:[/\\]*)
2518 # Relative path: add a thisdir entry.
2519 rpath="$rpath\$thisdir/$dir:"
2526 if test -n "$compile_shlibpath$finalize_shlibpath"; then
2527 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
2529 if test -n "$finalize_shlibpath"; then
2530 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
2535 if test -n "$runpath_var"; then
2536 if test -n "$perm_rpath"; then
2537 # We should set the runpath_var.
2539 for dir in $perm_rpath; do
2542 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
2544 if test -n "$finalize_perm_rpath"; then
2545 # We should set the runpath_var.
2547 for dir in $finalize_perm_rpath; do
2550 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
2554 if test "$hardcode_action" = relink; then
2555 # Fast installation is not supported
2556 link_command="$compile_var$compile_command$compile_rpath"
2557 relink_command="$finalize_var$finalize_command$finalize_rpath"
2559 # AGH! Flame the AIX and HP-UX people for me, will ya?
2560 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
2561 $echo "$modename: \`$output' will be relinked during installation" 1>&2
2563 if test "$fast_install" != no; then
2564 link_command="$finalize_var$compile_command$finalize_rpath"
2565 if test "$fast_install" = yes; then
2566 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
2568 # fast_install is set to needless
2572 link_command="$compile_var$compile_command$compile_rpath"
2573 relink_command="$finalize_var$finalize_command$finalize_rpath"
2577 # Replace the output file specification.
2578 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
2580 # Create the binary in the object directory, then wrap it.
2581 if test ! -d $output_objdir; then
2582 $show "$mkdir $output_objdir"
2583 $run $mkdir $output_objdir
2585 if test $status -ne 0 && test ! -d $objdir; then
2590 # Delete the old output file.
2591 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
2593 $show "$link_command"
2594 $run eval "$link_command" || exit $?
2596 # Now create the wrapper script.
2597 $show "creating $output"
2599 # Quote the relink command for shipping.
2600 if test -n "$relink_command"; then
2601 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
2604 # Quote $echo for shipping.
2605 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
2607 /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";;
2608 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
2610 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
2612 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
2615 # Only actually do things if our run command is non-null.
2616 if test -z "$run"; then
2617 # win32 will think the script is a binary if it has
2618 # a .exe suffix, so we strip it off here.
2620 *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
2623 trap "$rm $output; exit 1" 1 2 15
2628 # $output - temporary wrapper script for $objdir/$outputname
2629 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
2631 # The $output program cannot be directly executed until all the libtool
2632 # libraries that it depends on are installed.
2634 # This wrapper script should never be moved out of the build directory.
2635 # If it is, it will not operate correctly.
2637 # Sed substitution that helps us do robust quoting. It backslashifies
2638 # metacharacters that are still active within double-quoted strings.
2639 Xsed='sed -e 1s/^X//'
2640 sed_quote_subst='$sed_quote_subst'
2642 # The HP-UX ksh and POSIX shell print the target directory to stdout
2644 if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
2646 relink_command=\"$relink_command\"
2648 # This environment variable determines our operation mode.
2649 if test \"\$libtool_install_magic\" = \"$magic\"; then
2650 # install mode needs the following variable:
2651 link_against_libtool_libs='$link_against_libtool_libs'
2653 # When we are sourced in execute mode, \$file and \$echo are already set.
2654 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2657 # Make sure echo works.
2658 if test \"X\$1\" = X--no-reexec; then
2659 # Discard the --no-reexec flag, and continue.
2661 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
2662 # Yippee, \$echo works!
2665 # Restart under the correct shell, and then maybe \$echo will work.
2666 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2672 # Find the directory that this script lives in.
2673 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2674 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2676 # Follow symbolic links until we get to the real thisdir.
2677 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
2678 while test -n \"\$file\"; do
2679 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2681 # If there was a directory component, then change thisdir.
2682 if test \"x\$destdir\" != \"x\$file\"; then
2683 case \"\$destdir\" in
2684 /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;;
2685 *) thisdir=\"\$thisdir/\$destdir\" ;;
2689 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2690 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
2693 # Try to get the absolute directory name.
2694 absdir=\`cd \"\$thisdir\" && pwd\`
2695 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2698 if test "$fast_install" = yes; then
2700 program=lt-'$outputname'
2701 progdir=\"\$thisdir/$objdir\"
2703 if test ! -f \"\$progdir/\$program\" || \\
2704 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
2705 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2707 file=\"\$\$-\$program\"
2709 if test ! -d \"\$progdir\"; then
2710 $mkdir \"\$progdir\"
2712 $rm \"\$progdir/\$file\"
2717 # relink executable if necessary
2718 if test -n \"\$relink_command\"; then
2719 if (cd \"\$thisdir\" && eval \$relink_command); then :
2721 $rm \"\$progdir/\$file\"
2726 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2727 { $rm \"\$progdir/\$program\";
2728 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2729 $rm \"\$progdir/\$file\"
2733 program='$outputname'
2734 progdir=\"\$thisdir/$objdir\"
2740 if test -f \"\$progdir/\$program\"; then"
2742 # Export our shlibpath_var if we have one.
2743 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2745 # Add our own library path to $shlibpath_var
2746 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2748 # Some systems cannot cope with colon-terminated $shlibpath_var
2749 # The second colon is a workaround for a bug in BeOS R4 sed
2750 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2752 export $shlibpath_var
2756 # fixup the dll searchpath if we need to.
2757 if test -n "$dllsearchpath"; then
2759 # Add the dll search path components to the executable PATH
2760 PATH=$dllsearchpath:\$PATH
2765 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2766 # Run the actual program with our arguments.
2769 *-*-cygwin* | *-*-mingw | *-*-os2*)
2770 # win32 systems need to use the prog path for dll
2773 exec \$progdir\\\\\$program \${1+\"\$@\"}
2778 # Export the path to the program.
2779 PATH=\"\$progdir:\$PATH\"
2782 exec \$program \${1+\"\$@\"}
2787 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
2791 # The program doesn't exist.
2792 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
2793 \$echo \"This script is just a wrapper for \$program.\" 1>&2
2794 echo \"See the $PACKAGE documentation for more information.\" 1>&2
2805 # See if we need to build an old-fashioned archive.
2806 for oldlib in $oldlibs; do
2808 if test "$build_libtool_libs" = convenience; then
2809 oldobjs="$libobjs_save"
2810 addlibs="$convenience"
2811 build_libtool_libs=no
2813 if test "$build_libtool_libs" = module; then
2814 oldobjs="$libobjs_save"
2815 build_libtool_libs=no
2817 oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
2819 addlibs="$old_convenience"
2822 # Add in members from convenience archives.
2823 for xlib in $addlibs; do
2824 # Extract the objects.
2826 generated="$generated $xdir"
2827 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2829 $show "${rm}r $xdir"
2834 if test $status -ne 0 && test ! -d "$xdir"; then
2837 $show "(cd $xdir && $AR x ../$xlib)"
2838 $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
2840 oldobjs="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2843 # Do each command in the archive commands.
2844 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
2845 eval cmds=\"$old_archive_from_new_cmds\"
2847 eval cmds=\"$old_archive_cmds\"
2849 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2850 for cmd in $cmds; do
2853 $run eval "$cmd" || exit $?
2858 if test -n "$generated"; then
2859 $show "${rm}r$generated"
2860 $run ${rm}r$generated
2863 # Now create the libtool archive.
2867 test "$build_old_libs" = yes && old_library="$libname.$libext"
2868 $show "creating $output"
2870 if test -n "$xrpath"; then
2872 for libdir in $xrpath; do
2873 temp_xrpath="$temp_xrpath -R$libdir"
2875 dependency_libs="$temp_xrpath $dependency_libs"
2878 # Only create the output if not a dry run.
2879 if test -z "$run"; then
2881 # $output - a libtool library file
2882 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
2884 # The name that we can dlopen(3).
2887 # Names of this library.
2888 library_names='$library_names'
2890 # The name of the static archive.
2891 old_library='$old_library'
2893 # Libraries that this one depends upon.
2894 dependency_libs='$dependency_libs'
2896 # Version information for $libname.
2901 # Is this an already installed library?
2904 # Directory that this library needs to be installed in:
2905 libdir='$install_libdir'\
2908 $rm "$output_objdir/$outputname"i
2909 sed 's/^installed=no$/installed=yes/' \
2910 < "$output" > "$output_objdir/$outputname"i || exit 1
2913 # Do a symbolic link so that the libtool archive can be found in
2914 # LD_LIBRARY_PATH before the program is installed.
2915 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
2916 $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
2922 # libtool install mode
2924 modename="$modename: install"
2926 # There may be an optional sh(1) argument at the beginning of
2927 # install_prog (especially on Windows NT).
2928 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
2929 # Aesthetically quote it.
2930 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
2932 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
2936 install_prog="$arg "
2944 # The real first argument should be the name of the installation program.
2945 # Aesthetically quote it.
2946 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2948 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
2952 install_prog="$install_prog$arg"
2954 # We need to accept at least all the BSD install flags.
2964 if test -n "$dest"; then
2965 files="$files $dest"
2983 # If the previous option needed an argument, then skip it.
2984 if test -n "$prev"; then
2993 # Aesthetically quote the argument.
2994 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2996 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3000 install_prog="$install_prog $arg"
3003 if test -z "$install_prog"; then
3004 $echo "$modename: you must specify an install program" 1>&2
3009 if test -n "$prev"; then
3010 $echo "$modename: the \`$prev' option requires an argument" 1>&2
3015 if test -z "$files"; then
3016 if test -z "$dest"; then
3017 $echo "$modename: no file or destination specified" 1>&2
3019 $echo "$modename: you must specify a destination" 1>&2
3025 # Strip any trailing slash from the destination.
3026 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
3028 # Check to see that the destination is a directory.
3029 test -d "$dest" && isdir=yes
3030 if test "$isdir" = yes; then
3034 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
3035 test "X$destdir" = "X$dest" && destdir=.
3036 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
3038 # Not a directory, so check to see that there is only one file specified.
3040 if test $# -gt 2; then
3041 $echo "$modename: \`$dest' is not a directory" 1>&2
3047 /* | [A-Za-z]:[/\\]*) ;;
3049 for file in $files; do
3053 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
3062 # This variable tells wrapper scripts just to set variables rather
3063 # than running their programs.
3064 libtool_install_magic="$magic"
3069 for file in $files; do
3071 # Do each installation.
3074 # Do the static libraries later.
3075 staticlibs="$staticlibs $file"
3079 # Check to see that this really is a libtool archive.
3080 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3082 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
3089 # If there is no directory component, then add one.
3091 */* | *\\*) . $file ;;
3095 # Add the libdir to current_libdirs if it is the destination.
3096 if test "X$destdir" = "X$libdir"; then
3097 case "$current_libdirs " in
3099 *) current_libdirs="$current_libdirs $libdir" ;;
3102 # Note the libdir as a future libdir.
3103 case "$future_libdirs " in
3105 *) future_libdirs="$future_libdirs $libdir" ;;
3109 dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
3110 test "X$dir" = "X$file/" && dir=
3113 # See the names of the shared library.
3114 set dummy $library_names
3115 if test -n "$2"; then
3120 # Install the shared library and build the symlinks.
3121 $show "$install_prog $dir/$realname $destdir/$realname"
3122 $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
3123 test "X$dlname" = "X$realname" && dlname=
3125 if test $# -gt 0; then
3126 # Delete the old symlinks, and create new ones.
3129 test "X$dlname" = "X$linkname" && dlname=
3130 if test "$linkname" != "$realname"; then
3131 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3132 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3137 if test -n "$dlname"; then
3138 # Install the dynamically-loadable library.
3139 $show "$install_prog $dir/$dlname $destdir/$dlname"
3140 $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
3143 # Do each command in the postinstall commands.
3144 lib="$destdir/$realname"
3145 eval cmds=\"$postinstall_cmds\"
3146 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3147 for cmd in $cmds; do
3150 $run eval "$cmd" || exit $?
3155 # Install the pseudo-library for information purposes.
3156 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3157 instname="$dir/$name"i
3158 if test ! -f "$instname"; then
3159 # Just in case it was removed...
3160 $show "Creating $instname"
3162 sed 's/^installed=no$/installed=yes/' "$file" > "$instname"
3164 $show "$install_prog $instname $destdir/$name"
3165 $run eval "$install_prog $instname $destdir/$name" || exit $?
3167 # Maybe install the static library, too.
3168 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3172 # Install (i.e. copy) a libtool object.
3174 # Figure out destination file name, if it wasn't already specified.
3175 if test -n "$destname"; then
3176 destfile="$destdir/$destname"
3178 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3179 destfile="$destdir/$destfile"
3182 # Deduce the name of the destination old-style object file.
3185 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
3188 staticdest="$destfile"
3192 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
3198 # Install the libtool object if requested.
3199 if test -n "$destfile"; then
3200 $show "$install_prog $file $destfile"
3201 $run eval "$install_prog $file $destfile" || exit $?
3204 # Install the old object if enabled.
3205 if test "$build_old_libs" = yes; then
3206 # Deduce the name of the old-style object file.
3207 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
3209 $show "$install_prog $staticobj $staticdest"
3210 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
3216 # Figure out destination file name, if it wasn't already specified.
3217 if test -n "$destname"; then
3218 destfile="$destdir/$destname"
3220 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3221 destfile="$destdir/$destfile"
3224 # Do a test to see if this is really a libtool program.
3225 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3226 link_against_libtool_libs=
3229 # If there is no directory component, then add one.
3231 */* | *\\*) . $file ;;
3235 # Check the variables that should have been set.
3236 if test -z "$link_against_libtool_libs"; then
3237 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
3242 for lib in $link_against_libtool_libs; do
3243 # Check to see that each library is installed.
3245 if test -f "$lib"; then
3246 # If there is no directory component, then add one.
3248 */* | *\\*) . $lib ;;
3252 libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
3253 if test -n "$libdir" && test ! -f "$libfile"; then
3254 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
3260 if test "$fast_install" = no && test -n "$relink_command"; then
3261 if test "$finalize" = yes; then
3262 outputname="/tmp/$$-$file"
3263 # Replace the output file specification.
3264 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
3266 $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
3267 $show "$relink_command"
3268 if $run eval "$relink_command"; then :
3270 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
3275 $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
3278 # Install the binary that we compiled earlier.
3279 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
3283 $show "$install_prog$stripme $file $destfile"
3284 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
3285 test -n "$outputname" && $rm $outputname
3290 for file in $staticlibs; do
3291 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3293 # Set up the ranlib parameters.
3294 oldlib="$destdir/$name"
3296 $show "$install_prog $file $oldlib"
3297 $run eval "$install_prog \$file \$oldlib" || exit $?
3299 # Do each command in the postinstall commands.
3300 eval cmds=\"$old_postinstall_cmds\"
3301 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3302 for cmd in $cmds; do
3305 $run eval "$cmd" || exit $?
3310 if test -n "$future_libdirs"; then
3311 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
3314 if test -n "$current_libdirs"; then
3315 # Maybe just do a dry run.
3316 test -n "$run" && current_libdirs=" -n$current_libdirs"
3317 exec $SHELL $0 --finish$current_libdirs
3324 # libtool finish mode
3326 modename="$modename: finish"
3330 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3333 libdirs="$libdirs $dir"
3336 for libdir in $libdirs; do
3337 if test -n "$finish_cmds"; then
3338 # Do each command in the finish commands.
3339 eval cmds=\"$finish_cmds\"
3340 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3341 for cmd in $cmds; do
3344 $run eval "$cmd" || admincmds="$admincmds
3349 if test -n "$finish_eval"; then
3350 # Do the single finish_eval.
3351 eval cmds=\"$finish_eval\"
3352 $run eval "$cmds" || admincmds="$admincmds
3358 # Exit here if they wanted silent mode.
3359 test "$show" = : && exit 0
3361 echo "----------------------------------------------------------------------"
3362 echo "Libraries have been installed in:"
3363 for libdir in $libdirs; do
3367 echo "If you ever happen to want to link against installed libraries"
3368 echo "in a given directory, LIBDIR, you must either use libtool, and"
3369 echo "specify the full pathname of the library, or use \`-LLIBDIR'"
3370 echo "flag during linking and do at least one of the following:"
3371 if test -n "$shlibpath_var"; then
3372 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
3373 echo " during execution"
3375 if test -n "$runpath_var"; then
3376 echo " - add LIBDIR to the \`$runpath_var' environment variable"
3377 echo " during linking"
3379 if test -n "$hardcode_libdir_flag_spec"; then
3381 eval flag=\"$hardcode_libdir_flag_spec\"
3383 echo " - use the \`$flag' linker flag"
3385 if test -n "$admincmds"; then
3386 echo " - have your system administrator run these commands:$admincmds"
3388 if test -f /etc/ld.so.conf; then
3389 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3392 echo "See any operating system documentation about shared libraries for"
3393 echo "more information, such as the ld(1) and ld.so(8) manual pages."
3394 echo "----------------------------------------------------------------------"
3398 # libtool execute mode
3400 modename="$modename: execute"
3402 # The first argument is the command name.
3404 if test -z "$cmd"; then
3405 $echo "$modename: you must specify a COMMAND" 1>&2
3410 # Handle -dlopen flags immediately.
3411 for file in $execute_dlfiles; do
3412 if test ! -f "$file"; then
3413 $echo "$modename: \`$file' is not a file" 1>&2
3421 # Check to see that this really is a libtool archive.
3422 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3424 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3429 # Read the libtool library.
3433 # If there is no directory component, then add one.
3435 */* | *\\*) . $file ;;
3439 # Skip this library if it cannot be dlopened.
3440 if test -z "$dlname"; then
3441 # Warn if it was a shared library.
3442 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
3446 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3447 test "X$dir" = "X$file" && dir=.
3449 if test -f "$dir/$objdir/$dlname"; then
3452 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
3458 # Just add the directory containing the .lo file.
3459 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3460 test "X$dir" = "X$file" && dir=.
3464 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
3469 # Get the absolute pathname.
3470 absdir=`cd "$dir" && pwd`
3471 test -n "$absdir" && dir="$absdir"
3473 # Now add the directory to shlibpath_var.
3474 if eval "test -z \"\$$shlibpath_var\""; then
3475 eval "$shlibpath_var=\"\$dir\""
3477 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
3481 # This variable tells wrapper scripts just to set shlibpath_var
3482 # rather than running their programs.
3483 libtool_execute_magic="$magic"
3485 # Check if any of the arguments is a wrapper script.
3492 # Do a test to see if this is really a libtool program.
3493 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3494 # If there is no directory component, then add one.
3496 */* | *\\*) . $file ;;
3500 # Transform arg to wrapped name.
3501 file="$progdir/$program"
3505 # Quote arguments (to preserve shell metacharacters).
3506 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
3507 args="$args \"$file\""
3510 if test -z "$run"; then
3511 # Export the shlibpath_var.
3512 eval "export $shlibpath_var"
3514 # Restore saved enviroment variables
3515 if test "${save_LC_ALL+set}" = set; then
3516 LC_ALL="$save_LC_ALL"; export LC_ALL
3518 if test "${save_LANG+set}" = set; then
3519 LANG="$save_LANG"; export LANG
3522 # Now actually exec the command.
3523 eval "exec \$cmd$args"
3525 $echo "$modename: cannot exec \$cmd$args"
3528 # Display what would be done.
3529 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
3530 $echo "export $shlibpath_var"
3536 # libtool uninstall mode
3538 modename="$modename: uninstall"
3545 -*) rm="$rm $arg" ;;
3546 *) files="$files $arg" ;;
3550 if test -z "$rm"; then
3551 $echo "$modename: you must specify an RM program" 1>&2
3556 for file in $files; do
3557 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3558 test "X$dir" = "X$file" && dir=.
3559 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3565 # Possibly a libtool archive, so verify it.
3566 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3569 # Delete the libtool libraries and symlinks.
3570 for n in $library_names; do
3571 rmfiles="$rmfiles $dir/$n"
3572 test "X$n" = "X$dlname" && dlname=
3574 test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
3575 test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
3577 $show "$rm $rmfiles"
3580 if test -n "$library_names"; then
3581 # Do each command in the postuninstall commands.
3582 eval cmds=\"$postuninstall_cmds\"
3583 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3584 for cmd in $cmds; do
3592 if test -n "$old_library"; then
3593 # Do each command in the old_postuninstall commands.
3594 eval cmds=\"$old_postuninstall_cmds\"
3595 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3596 for cmd in $cmds; do
3604 # FIXME: should reinstall the best remaining shared library.
3609 if test "$build_old_libs" = yes; then
3610 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
3611 rmfiles="$rmfiles $dir/$oldobj"
3613 $show "$rm $rmfiles"
3618 $show "$rm $rmfiles"
3627 $echo "$modename: you must specify a MODE" 1>&2
3628 $echo "$generic_help" 1>&2
3633 $echo "$modename: invalid operation mode \`$mode'" 1>&2
3634 $echo "$generic_help" 1>&2
3636 fi # test -z "$show_help"
3638 # We need to display help for each of the modes.
3641 "Usage: $modename [OPTION]... [MODE-ARG]...
3643 Provide generalized library-building support services.
3645 --config show all configuration variables
3646 --debug enable verbose shell tracing
3647 -n, --dry-run display commands without modifying any files
3648 --features display basic configuration information and exit
3649 --finish same as \`--mode=finish'
3650 --help display this help message and exit
3651 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
3652 --quiet same as \`--silent'
3653 --silent don't print informational messages
3654 --version print version information
3656 MODE must be one of the following:
3658 compile compile a source file into a libtool object
3659 execute automatically set library path, then run a program
3660 finish complete the installation of libtool libraries
3661 install install libraries or executables
3662 link create a library or an executable
3663 uninstall remove libraries from an installed directory
3665 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
3666 a more detailed description of MODE."
3672 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
3674 Compile a source file into a libtool library object.
3676 This mode accepts the following additional options:
3678 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3679 -static always build a \`.o' file suitable for static linking
3681 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
3682 from the given SOURCEFILE.
3684 The output file name is determined by removing the directory component from
3685 SOURCEFILE, then substituting the C source code suffix \`.c' with the
3686 library object suffix, \`.lo'."
3691 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
3693 Automatically set library path, then run a program.
3695 This mode accepts the following additional options:
3697 -dlopen FILE add the directory containing FILE to the library path
3699 This mode sets the library path environment variable according to \`-dlopen'
3702 If any of the ARGS are libtool executable wrappers, then they are translated
3703 into their corresponding uninstalled binary, and any of their required library
3704 directories are added to the library path.
3706 Then, COMMAND is executed, with ARGS as arguments."
3711 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
3713 Complete the installation of libtool libraries.
3715 Each LIBDIR is a directory that contains libtool libraries.
3717 The commands that this mode executes may require superuser privileges. Use
3718 the \`--dry-run' option if you just want to see what would be executed."
3723 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
3725 Install executables or libraries.
3727 INSTALL-COMMAND is the installation command. The first component should be
3728 either the \`install' or \`cp' program.
3730 The rest of the components are interpreted as arguments to that command (only
3731 BSD-compatible install options are recognized)."
3736 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
3738 Link object files or libraries together to form another library, or to
3739 create an executable program.
3741 LINK-COMMAND is a command using the C compiler that you would use to create
3742 a program from several object files.
3744 The following components of LINK-COMMAND are treated specially:
3746 -all-static do not do any dynamic linking at all
3747 -avoid-version do not add a version suffix if possible
3748 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
3749 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
3750 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
3751 -export-symbols SYMFILE
3752 try to export only the symbols listed in SYMFILE
3753 -LLIBDIR search LIBDIR for required installed libraries
3754 -lNAME OUTPUT-FILE requires the installed library libNAME
3755 -module build a library that can dlopened
3756 -no-undefined declare that a library does not refer to external symbols
3757 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
3758 -release RELEASE specify package release information
3759 -rpath LIBDIR the created library will eventually be installed in LIBDIR
3760 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
3761 -static do not do any dynamic linking of libtool libraries
3762 -version-info CURRENT[:REVISION[:AGE]]
3763 specify library version info [each variable defaults to 0]
3765 All other options (arguments beginning with \`-') are ignored.
3767 Every other argument is treated as a filename. Files ending in \`.la' are
3768 treated as uninstalled libtool libraries, other files are standard or library
3771 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
3772 only library objects (\`.lo' files) may be specified, and \`-rpath' is
3773 required, except when creating a convenience library.
3775 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
3776 using \`ar' and \`ranlib', or on Windows using \`lib'.
3778 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
3779 is created, otherwise an executable program is created."
3784 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
3786 Remove libraries from an installation directory.
3788 RM is the name of the program to use to delete files associated with each FILE
3789 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
3792 If FILE is a libtool library, all the files associated with it are deleted.
3793 Otherwise, only FILE itself is deleted using RM."
3797 $echo "$modename: invalid operation mode \`$mode'" 1>&2
3804 $echo "Try \`$modename --help' for more information about other modes."