*)
# Just use the default operation mode.
if test -z "$mode"; then
- if test -n "$nonopt"; then
- echo "$progname: warning: cannot infer operation mode from \`$nonopt'" 1>&2
- else
- echo "$progname: warning: cannot infer operation mode without MODE-ARGS" 1>&2
- fi
+ if test -n "$nonopt"; then
+ echo "$progname: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+ else
+ echo "$progname: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+ fi
fi
;;
esac
do
# Quote any args containing shell metacharacters.
case "$arg" in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*|*\"*)
- quote_arg="'$arg'" ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*|*\"*)
+ quote_arg="'$arg'" ;;
*) quote_arg="$arg" ;;
esac
$show "$base_compile$pic_flag -DPIC $srcfile"
if $run eval "$base_compile$pic_flag -DPIC $srcfile"; then :
else
- test -n "$obj" && $run $rm $obj
- exit 1
+ test -n "$obj" && $run $rm $obj
+ exit 1
fi
# If we have no pic_flag, then copy the object into place and finish.
if test -z "$pic_flag"; then
- $show "$LN_S $obj $libobj"
- $run $LN_S $obj $libobj
- exit $?
+ $show "$LN_S $obj $libobj"
+ $run $LN_S $obj $libobj
+ exit $?
fi
# Just move the object, then go on to compile the next one
do
case "$arg" in
-static)
- build_libtool_libs=no
- build_old_libs=yes
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_direct" = unsupported && test -z "$link_static_flag"; then
+ echo "$progname: warning: static linking is impossible in this configuration" 1>&2
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ build_old_libs=yes
break
;;
esac
do
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
- case "$prev" in
- output)
- compile_command="$compile_command @OUTPUT@"
- finalize_command="$finalize_command @OUTPUT@"
- args="$args $arg"
- ;;
- esac
-
- case "$prev" in
+ case "$prev" in
+ output)
+ compile_command="$compile_command @OUTPUT@"
+ finalize_command="$finalize_command @OUTPUT@"
+ args="$args $arg"
+ ;;
+ esac
+
+ case "$prev" in
dlfiles|dlprefiles)
- case "$arg" in
- *.la) ;; # We handle this case below.
+ case "$arg" in
+ *.la) ;; # We handle this case below.
*)
dlprefiles="$dlprefiles $arg"
- test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
- prev=
+ test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
+ prev=
;;
esac
;;
*)
- eval "$prev=\"\$arg\""
- prev=
- continue
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
;;
esac
fi
-allow-undefined) allow_undefined=yes ;;
-dlopen)
- prev=dlfiles
- continue
- ;;
+ prev=dlfiles
+ continue
+ ;;
-dlpreopen)
- prev=dlprefiles
- continue
- ;;
+ prev=dlprefiles
+ continue
+ ;;
-export-dynamic)
- if test "$export_dynamic" != yes; then
- export_dynamic=yes
- compile_command="$compile_command "`eval echo "$export_dynamic_flag_spec"`
- finalize_command="$finalize_command "`eval echo "$export_dynamic_flag_spec"`
- # Add the symbol object into the linking commands.
- compile_command="$compile_command @SYMFILE@"
- finalize_command="$finalize_command @SYMFILE@"
+ if test "$export_dynamic" != yes; then
+ export_dynamic=yes
+ compile_command="$compile_command "`eval echo "$export_dynamic_flag_spec"`
+ finalize_command="$finalize_command "`eval echo "$export_dynamic_flag_spec"`
+ # Add the symbol object into the linking commands.
+ compile_command="$compile_command @SYMFILE@"
+ finalize_command="$finalize_command @SYMFILE@"
fi
- continue
- ;;
+ continue
+ ;;
-L*)
- dir=`echo "$arg" | sed 's%^-L\(.*\)$%\1%'`
- case "$dir" in
- /*)
- ;;
- *)
- echo "$progname: \`-L$dir' cannot specify a relative directory" 1>&2
- exit 1
- ;;
- esac
- deplibs="$deplibs $arg"
- ;;
+ dir=`echo "$arg" | sed 's%^-L\(.*\)$%\1%'`
+ case "$dir" in
+ /*)
+ ;;
+ *)
+ echo "$progname: \`-L$dir' cannot specify a relative directory" 1>&2
+ exit 1
+ ;;
+ esac
+ deplibs="$deplibs $arg"
+ ;;
-l*) deplibs="$deplibs $arg" ;;
-o) prev=output ;;
-rpath)
- prev=install_libdir
- continue
- ;;
+ prev=install_libdir
+ continue
+ ;;
-static)
- link_static="`eval echo \"$link_static_flag\"`"
- compile_command="$compile_command $link_static"
- continue
- ;;
-
- -version-file)
- echo "$progname: \`-version-file' has been replaced by \`-version-info'" 1>&2
- echo "$help" 1>&2
- exit 1
- ;;
+ link_static="$link_static_flag"
+ test -n "$link_static" && compile_command="$compile_command $link_static"
+ continue
+ ;;
-version-info)
- prev=vinfo
- continue
- ;;
+ prev=vinfo
+ continue
+ ;;
-*) CC="$CC $arg" ;; # Some other compiler flag.
*.o)
- # A standard object.
- objs="$objs $arg"
- ;;
+ # A standard object.
+ objs="$objs $arg"
+ ;;
*.a)
- # Find the relevant object directory and library name.
- file=`echo "$arg" | sed 's%^.*/%%'`
- dir=`echo "$arg" | sed 's%/[^/]*$%/%'`
- test "$dir" = "$arg" && dir=
+ # Find the relevant object directory and library name.
+ file=`echo "$arg" | sed 's%^.*/%%'`
+ dir=`echo "$arg" | sed 's%/[^/]*$%/%'`
+ test "$dir" = "$arg" && dir=
- # Standard archive.
- objs="$objs $arg"
- ;;
+ # Standard archive.
+ objs="$objs $arg"
+ ;;
*.lo)
- # A library object.
- libobjs="$libobjs $arg"
- ;;
+ # A library object.
+ libobjs="$libobjs $arg"
+ ;;
*.la)
- # A libtool-controlled library.
-
- dlname=
- libdir=
- library_names=
- old_library=
-
- # Check to see that this really is a libtool archive.
- if egrep "^# Generated by ltmain.sh" $arg >/dev/null 2>&1; then :
- else
- echo "$progname: \`$arg' is not a valid libtool archive" 1>&2
- exit 1
- fi
-
- # If there is no directory component, then add one.
- case "$arg" in
- */*) . $arg ;;
- *) . ./$arg ;;
- esac
-
- if test -z "$libdir"; then
- echo "$progname: \`$arg' contains no -rpath information" 1>&2
- exit 1
- fi
-
- # Get the name of the library we link against.
- linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
-
- if test -z "$linklib"; then
- echo "$progname: cannot find name of link library for \`$arg'" 1>&2
- exit 1
- fi
-
- # Find the relevant object directory and library name.
- name=`echo "$arg" | sed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
- dir=`echo "$arg" | sed 's%/[^/]*$%%'`
- if test "$dir" = "$arg"; then
- dir="$objdir"
- else
- dir="$dir/$objdir"
- fi
-
- # This library was specified with -dlopen.
- if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
- if test -z "$dlname"; then
- # If there is no dlname, we need to preload.
- prev=dlprefiles
- else
- # We should not create a dependency on this library.
- prev=
- continue
- fi
- fi
-
- # The library was specified with -dlpreopen.
- if test "$prev" = dlprefiles; then
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- dlprefiles="$dlprefiles $dir/$old_library"
- else
- dlprefiles="$dlprefiles $dir/$linklib"
- fi
- prev=
- fi
-
- if test "$build_libtool_libs" = yes && test -n "$library_names"; then
- link_against_libtool_libs="$link_against_libtool_libs $arg"
- if test -n "$shlibpath_var"; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- "* $dir *") ;;
- *) temp_rpath="$temp_rpath $dir" ;;
- esac
- fi
+ # A libtool-controlled library.
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$libdir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the libdirs.
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- libdir=
- fi
- fi
-
- if test -n "$libdir"; then
- hardcode_libdir_flag=`eval echo \"$hardcode_libdir_flag_spec\"`
- compile_command="$compile_command $hardcode_libdir_flag"
- finalize_command="$finalize_command $hardcode_libdir_flag"
- fi
- elif test "$hardcode_runpath_var" = yes; then
- # Do the same for the permanent run path.
- case "$perm_rpath " in
- "* $libdir *") ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
+ dlname=
+ libdir=
+ library_names=
+ old_library=
+
+ # Check to see that this really is a libtool archive.
+ if egrep "^# Generated by ltmain.sh" $arg >/dev/null 2>&1; then :
+ else
+ echo "$progname: \`$arg' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
+ # If there is no directory component, then add one.
+ case "$arg" in
+ */*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+ if test -z "$libdir"; then
+ echo "$progname: \`$arg' contains no -rpath information" 1>&2
+ exit 1
+ fi
- case "$hardcode_action" in
- immediate)
- if test "$hardcode_direct" = no; then
- compile_command="$compile_command $dir/$linklib"
- elif test "$hardcode_minus_L" = no; then
- compile_command="$compile_command -L$dir -l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- compile_shlibpath="$compile_shlibpath$dir:"
- compile_command="$compile_command -l$name"
- fi
- ;;
-
- relink)
- # We need an absolute path.
- case "$dir" in
- /*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- echo "$progname: cannot determine absolute directory name of \`$dir'" 1>&2
- exit 1
- fi
- dir="$absdir"
- ;;
- esac
-
- if test "$hardcode_direct" = yes; then
- compile_command="$compile_command $dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- compile_command="$compile_command -L$dir -l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- compile_shlibpath="$compile_shlibpath$dir:"
- compile_command="$compile_command -l$name"
- fi
- ;;
-
- *)
- echo "$progname: \`$hardcode_action' is an unknown hardcode action" 1>&2
- exit 1
- ;;
- esac
-
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
- finalize_command="$finalize_command $libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- finalize_command="$finalize_command -L$libdir -l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- finalize_shlibpath="$finalize_shlibpath$libdir:"
- finalize_command="$finalize_command -l$name"
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+
+ if test -z "$linklib"; then
+ echo "$progname: cannot find name of link library for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Find the relevant object directory and library name.
+ name=`echo "$arg" | sed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
+ dir=`echo "$arg" | sed 's%/[^/]*$%%'`
+ if test "$dir" = "$arg"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ if test -z "$dlname"; then
+ # If there is no dlname, we need to preload.
+ prev=dlprefiles
+ else
+ # We should not create a dependency on this library.
+ prev=
+ continue
+ fi
+ fi
+
+ # The library was specified with -dlpreopen.
+ if test "$prev" = dlprefiles; then
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ dlprefiles="$dlprefiles $dir/$old_library"
+ else
+ dlprefiles="$dlprefiles $dir/$linklib"
+ fi
+ prev=
+ fi
+
+ if test "$build_libtool_libs" = yes && test -n "$library_names"; then
+ link_against_libtool_libs="$link_against_libtool_libs $arg"
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ "* $dir *") ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+
+
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ # Put the magic libdir with the hardcode flag.
+ hardcode_libdirs="$libdir"
+ libdir="@HARDCODE_LIBDIRS@"
+ else
+ # Just accumulate the libdirs.
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ libdir=
+ fi
+ fi
+
+ if test -n "$libdir"; then
+ hardcode_libdir_flag=`eval echo \"$hardcode_libdir_flag_spec\"`
+ compile_command="$compile_command $hardcode_libdir_flag"
+ finalize_command="$finalize_command $hardcode_libdir_flag"
+ fi
+ elif test "$hardcode_runpath_var" = yes; then
+ # Do the same for the permanent run path.
+ case "$perm_rpath " in
+ "* $libdir *") ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+
+
+ case "$hardcode_action" in
+ immediate)
+ if test "$hardcode_direct" = no; then
+ compile_command="$compile_command $dir/$linklib"
+ elif test "$hardcode_minus_L" = no; then
+ compile_command="$compile_command -L$dir -l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ compile_shlibpath="$compile_shlibpath$dir:"
+ compile_command="$compile_command -l$name"
+ fi
+ ;;
+
+ relink)
+ # We need an absolute path.
+ case "$dir" in
+ /*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ echo "$progname: cannot determine absolute directory name of \`$dir'" 1>&2
+ exit 1
+ fi
+ dir="$absdir"
+ ;;
+ esac
+
+ if test "$hardcode_direct" = yes; then
+ compile_command="$compile_command $dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ compile_command="$compile_command -L$dir -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ compile_shlibpath="$compile_shlibpath$dir:"
+ compile_command="$compile_command -l$name"
+ fi
+ ;;
+
+ *)
+ echo "$progname: \`$hardcode_action' is an unknown hardcode action" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes; then
+ finalize_command="$finalize_command $libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ finalize_command="$finalize_command -L$libdir -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ finalize_shlibpath="$finalize_shlibpath$libdir:"
+ finalize_command="$finalize_command -l$name"
else
# We can't seem to hardcode it, guess we'll fake it.
- finalize_command="$finalize_command -L$libdir -l$name"
- fi
+ finalize_command="$finalize_command -L$libdir -l$name"
+ fi
else
# Transform directly to old archives if we don't build new libraries.
if test -n "$pic_flag" && test -z "$old_library"; then
echo "$progname: cannot find static library for \`$arg'" 1>&2
- exit 1
+ exit 1
+ fi
+ test -n "$old_library" && linklib="$old_library"
+
+ if test "$hardcode_direct" != unsupported; then
+ compile_command="$compile_command $dir/$linklib"
+ finalize_command="$finalize_command $dir/$linklib"
+ else
+ # Here we assume that "$hardcode_minusL" != unsupported.
+ compile_command="$compile_command -L$dir -l$name"
+ finalize_command="$finalize_command -L$dir -l$name"
fi
- test -n "$old_library" && linklib="$old_library"
- compile_command="$compile_command $dir/$linklib"
- finalize_command="$finalize_command $dir/$linklib"
fi
- continue
- ;;
+ continue
+ ;;
*)
echo "$progname: unknown file suffix for \`$arg'" 1>&2
- echo "$help" 1>&2
- exit 1
- ;;
+ echo "$help" 1>&2
+ exit 1
+ ;;
esac
compile_command="$compile_command $arg"
age=0
if test -n "$objs"; then
- echo "$progname: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
- exit 1
+ echo "$progname: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
+ exit 1
fi
# How the heck are we supposed to write a wrapper for a shared library?
if test -n "$link_against_libtool_libs"; then
echo "$progname: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2
- exit 1
+ exit 1
fi
if test -n "$dlfiles$dlprefiles"; then
- echo "$progname: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2
- # Nullify the symbol file.
- compile_command=`echo "$compile_command" | sed "s% @SYMFILE@%%"`
- finalize_command=`echo "$finalize_command" | sed "s% @SYMFILE@%%"`
+ echo "$progname: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2
+ # Nullify the symbol file.
+ compile_command=`echo "$compile_command" | sed "s% @SYMFILE@%%"`
+ finalize_command=`echo "$finalize_command" | sed "s% @SYMFILE@%%"`
fi
if test -z "$install_libdir"; then
- echo "$progname: you must specify an installation directory with \`-rpath'" 1>&2
- exit 1
+ echo "$progname: you must specify an installation directory with \`-rpath'" 1>&2
+ exit 1
fi
# Parse the version information argument.
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
set dummy $vinfo
IFS="$save_ifs"
if test -n "$5"; then
echo "$progname: too many parameters to \`-version-info'" 1>&2
- echo "$help" 1>&2
- exit 1
+ echo "$help" 1>&2
+ exit 1
fi
test -n "$2" && current="$2"
case "$current" in
0 | [1-9] | [1-9][0-9]*) ;;
*)
- echo "$progname: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ echo "$progname: CURRENT \`$current' is not a nonnegative integer" 1>&2
echo "$progname: \`$vinfo' is not valid version information" 1>&2
exit 1
- ;;
+ ;;
esac
case "$revision" in
0 | [1-9] | [1-9][0-9]*) ;;
*)
- echo "$progname: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ echo "$progname: REVISION \`$revision' is not a nonnegative integer" 1>&2
echo "$progname: \`$vinfo' is not valid version information" 1>&2
exit 1
- ;;
+ ;;
esac
case "$age" in
0 | [1-9] | [1-9][0-9]*) ;;
*)
- echo "$progname: AGE \`$age' is not a nonnegative integer" 1>&2
+ echo "$progname: AGE \`$age' is not a nonnegative integer" 1>&2
echo "$progname: \`$vinfo' is not valid version information" 1>&2
exit 1
- ;;
+ ;;
esac
if test $age -gt $current; then
none) ;;
linux)
- version_vars="$version_vars major versuffix"
- major=`expr $current - $age`
- versuffix="$major.$age.$revision"
- ;;
+ version_vars="$version_vars major versuffix"
+ major=`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ ;;
osf)
- version_vars="$version_vars versuffix verstring"
- major=`expr $current - $age`
- versuffix="$current.$age.$revision"
- verstring="$versuffix"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test $loop != 0; do
- iface=`expr $current - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
+ version_vars="$version_vars versuffix verstring"
+ major=`expr $current - $age`
+ versuffix="$current.$age.$revision"
+ verstring="$versuffix"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test $loop != 0; do
+ iface=`expr $current - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
sunos)
- version_vars="$version_vars major versuffix"
- major="$current"
- versuffix="$current.$revision"
- ;;
+ version_vars="$version_vars major versuffix"
+ major="$current"
+ versuffix="$current.$revision"
+ ;;
*)
- echo "$progname: unknown library version type \`$version_type'" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
- ;;
+ echo "$progname: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+ ;;
esac
# Create the output directory, or remove our outputs if we need to.
$run $rm $objdir/$libname.*
else
$show "$mkdir $objdir"
- $run $mkdir $objdir || exit $?
+ $run $mkdir $objdir || exit $?
fi
# Check to see if the archive will have undefined symbols.
if test "$allow_undefined" = yes; then
- if test "$allow_undefined_flag" = unsupported; then
- echo "$progname: warning: undefined symbols not allowed in $host shared libraries" 1>&2
- build_libtool_libs=no
- fi
+ if test "$allow_undefined_flag" = unsupported; then
+ echo "$progname: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ build_libtool_libs=no
+ fi
else
- # Clear the flag.
- allow_undefined_flag=
+ # Clear the flag.
+ allow_undefined_flag=
fi
if test "$build_libtool_libs" = yes; then
- # Get the real and link names of the library.
- library_names=`eval echo \"$library_names_spec\"`
- set dummy $library_names
- realname="$2"
- shift; shift
-
- if test -n "$soname_spec"; then
- soname=`eval echo \"$soname_spec\"`
- else
- soname="$realname"
- fi
-
- lib="$objdir/$realname"
- linknames=
- for link
- do
- linknames="$linknames $link"
- done
-
- # Use standard objects if they are PIC.
- test -z "$pic_flag" && libobjs=`echo "$libobjs " | sed -e 's/\.lo /.o /g' -e 's/ $//g'`
-
- # Do each of the archive commands.
- cmds=`eval echo \"$archive_cmds\"`
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
-
- # Create links to the real library.
- for link in $linknames; do
- $show "(cd $objdir && $LN_S $realname $link)"
- $run eval '(cd $objdir && $LN_S $realname $link)' || exit $?
- done
-
- # If -export-dynamic was specified, set the dlname.
- if test "$export_dynamic" = yes; then
- # On all known operating systems, these are identical.
- dlname="$soname"
- fi
+ # Get the real and link names of the library.
+ library_names=`eval echo \"$library_names_spec\"`
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+
+ if test -n "$soname_spec"; then
+ soname=`eval echo \"$soname_spec\"`
+ else
+ soname="$realname"
+ fi
+
+ lib="$objdir/$realname"
+ linknames=
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are PIC.
+ test -z "$pic_flag" && libobjs=`echo "$libobjs " | sed -e 's/\.lo /.o /g' -e 's/ $//g'`
+
+ # Do each of the archive commands.
+ cmds=`eval echo \"$archive_cmds\"`
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Create links to the real library.
+ for link in $linknames; do
+ $show "(cd $objdir && $LN_S $realname $link)"
+ $run eval '(cd $objdir && $LN_S $realname $link)' || exit $?
+ done
+
+ # If -export-dynamic was specified, set the dlname.
+ if test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
fi
;;
*.lo | *.o)
if test -n "$link_against_libtool_libs"; then
- echo "$progname: error: cannot link libtool libraries into reloadable objects" 1>&2
- exit 1
+ echo "$progname: error: cannot link libtool libraries into reloadable objects" 1>&2
+ exit 1
fi
if test -n "$deplibs"; then
- echo "$progname: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2
+ echo "$progname: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2
fi
if test -n "$dlfiles$dlprefiles"; then
- echo "$progname: warning: \`-dlopen' is ignored while creating objects" 1>&2
- # Nullify the symbol file.
- compile_command=`echo "$compile_command" | sed "s% @SYMFILE@%%"`
- finalize_command=`echo "$finalize_command" | sed "s% @SYMFILE@%%"`
+ echo "$progname: warning: \`-dlopen' is ignored while creating objects" 1>&2
+ # Nullify the symbol file.
+ compile_command=`echo "$compile_command" | sed "s% @SYMFILE@%%"`
+ finalize_command=`echo "$finalize_command" | sed "s% @SYMFILE@%%"`
fi
if test -n "$install_libdir"; then
fi
if test -n "$vinfo"; then
- echo "$progname: warning: \`-version-info' is ignored while creating objects" 1>&2
+ echo "$progname: warning: \`-version-info' is ignored while creating objects" 1>&2
fi
case "$output" in
*.lo)
- if test -n "$objs"; then
- echo "$progname: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit 1
- fi
- libobj="$output"
- obj=`echo "$output" | sed 's/\.lo$/.o/'`
- ;;
+ if test -n "$objs"; then
+ echo "$progname: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit 1
+ fi
+ libobj="$output"
+ obj=`echo "$output" | sed 's/\.lo$/.o/'`
+ ;;
*)
libobj=
- obj="$output"
- ;;
+ obj="$output"
+ ;;
esac
# Delete the old objects.
$run $rm $obj $libobj
# Create the old-style object.
- reload_objs="$objs"`echo "$libobjs " | sed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
+ reload_objs="$objs"`echo "$libobjs " | sed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
output="$obj"
cmds=`eval echo \"$reload_cmds\"`
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
- $run eval "$cmd" || exit $?
+ $run eval "$cmd" || exit $?
done
IFS="$save_ifs"
if test "$build_libtool_libs" != yes; then
# Create an invalid libtool object if no PIC, so that we don't
# accidentally link it into a program.
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > $libobj" || exit $?
- exit 0
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > $libobj" || exit $?
+ exit 0
fi
if test -n "$pic_flag"; then
- # Only do commands if we really have different PIC objects.
- reload_objs="$libobjs"
- output="$libobj"
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs"
+ output="$libobj"
cmds=`eval echo \"$reload_cmds\"`
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
fi
if test -n "$vinfo"; then
- echo "$progname: warning: \`-version-info' is ignored while linking programs" 1>&2
+ echo "$progname: warning: \`-version-info' is ignored while linking programs" 1>&2
fi
if test -n "$libobjs"; then
- # Transform all the library objects into standard objects.
- compile_command=`echo "$compile_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
- finalize_command=`echo "$finalize_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
+ # Transform all the library objects into standard objects.
+ compile_command=`echo "$compile_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
+ finalize_command=`echo "$finalize_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
fi
if test "$export_dynamic" = yes && test -n "$global_symbol_pipe" && test -n "$NM"; then
- # Add our own program objects to the preloaded list.
- dlprefiles=`echo "$objs$libobjs$dlprefiles " | sed -e 's/\.lo /.o/g' -e 's/ $//'`
+ # Add our own program objects to the preloaded list.
+ dlprefiles=`echo "$objs$libobjs$dlprefiles " | sed -e 's/\.lo /.o/g' -e 's/ $//'`
# Discover the nlist of each of the dlfiles.
- dlsyms="$objdir/${output}S.c"
- nlist="$objdir/${output}.nm"
+ dlsyms="$objdir/${output}S.c"
+ nlist="$objdir/${output}.nm"
- $run rm -f "$nlist" "$nlist"T
- for arg in $dlprefiles; do
- echo "extracting global symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
+ $run rm -f "$nlist" "$nlist"T
+ for arg in $dlprefiles; do
+ echo "extracting global symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
- # Parse the name list into a C file.
- echo "creating $dlsyms"
- if test -z "$run"; then
- # Try sorting and uniquifying the output.
- sort "$nlist" | uniq > "$nlist"T && mv -f "$nlist"T "$nlist"
+ # Parse the name list into a C file.
+ echo "creating $dlsyms"
+ if test -z "$run"; then
+ # Try sorting and uniquifying the output.
+ sort "$nlist" | uniq > "$nlist"T && mv -f "$nlist"T "$nlist"
cat <<EOF > "$dlsyms"
/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
/* External symbol declarations for the compiler. */
EOF
- if test -f "$nlist"; then
- # Prevent the only kind of circular reference mistake we can make.
- sed -e '/ dld_preloaded_symbols$/d' -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$dlsyms"
- else
- echo "/* NONE */" >> "$dlsyms"
- fi
+ if test -f "$nlist"; then
+ # Prevent the only kind of circular reference mistake we can make.
+ sed -e '/ dld_preloaded_symbols$/d' -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$dlsyms"
+ else
+ echo "/* NONE */" >> "$dlsyms"
+ fi
- cat <<\EOF >> "$dlsyms"
+ cat <<\EOF >> "$dlsyms"
#if defined (__STDC__) && __STDC__
# define __ptr_t void *
{
EOF
- if test -f "$nlist"; then
- sed 's/^\(.*\) \(.*\)$/ {"\1", \&\2},/' < "$nlist" >> "$dlsyms"
- fi
+ if test -f "$nlist"; then
+ sed 's/^\(.*\) \(.*\)$/ {"\1", \&\2},/' < "$nlist" >> "$dlsyms"
+ fi
cat <<\EOF >> "$dlsyms"
{0},
};
EOF
- fi
- $run rm -f "$nlist" "$nlist"T
+ fi
+ $run rm -f "$nlist" "$nlist"T
- # Now compile the dynamic symbol file.
- $show "(cd $objdir && $CC -c$no_builtin_flag \"${output}S.c\")"
- $run eval '(cd $objdir && $CC -c$no_builtin_flag "${output}S.c")' || exit $?
+ # Now compile the dynamic symbol file.
+ $show "(cd $objdir && $CC -c$no_builtin_flag \"${output}S.c\")"
+ $run eval '(cd $objdir && $CC -c$no_builtin_flag "${output}S.c")' || exit $?
- # Transform the symbol file into the correct name.
- compile_command=`echo "$compile_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`
- finalize_command=`echo "$finalize_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`
+ # Transform the symbol file into the correct name.
+ compile_command=`echo "$compile_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`
+ finalize_command=`echo "$finalize_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`
elif test "$export_dynamic" != yes; then
test -n "$dlfiles$dlprefiles" && echo "$progname: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
else
- # We keep going just in case the user didn't refer to
- # dld_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
- echo "$progname: not configured to extract global symbols from dlpreopened files" 1>&2
-
- # Nullify the symbol file.
- compile_command=`echo "$compile_command" | sed "s% @SYMFILE@%%"`
- finalize_command=`echo "$finalize_command" | sed "s% @SYMFILE@%%"`
+ # We keep going just in case the user didn't refer to
+ # dld_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+ echo "$progname: not configured to extract global symbols from dlpreopened files" 1>&2
+
+ # Nullify the symbol file.
+ compile_command=`echo "$compile_command" | sed "s% @SYMFILE@%%"`
+ finalize_command=`echo "$finalize_command" | sed "s% @SYMFILE@%%"`
fi
if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
- # Replace the output file specification.
- compile_command=`echo "$compile_command" | sed 's%@OUTPUT@%'"$output"'%g'`
- finalize_command=`echo "$finalize_command" | sed 's%@OUTPUT@%'"$output"'%g'`
-
- # We have no uninstalled library dependencies, so finalize right now.
- $show "$compile_command"
- $run $compile_command
- status=$?
-
- # If we failed to link statically, then try again.
- if test $status -ne 0 && test -n "$link_static"; then
- echo "$progname: cannot link \`$output' statically; retrying semi-dynamically" 1>&2
- compile_command=`echo "$compile_command " | sed -e "s% $link_static % %" -e 's/ $//'`
- $show "$compile_command"
- $run $compile_command
- status=$?
- fi
- exit $status
+ # Replace the output file specification.
+ compile_command=`echo "$compile_command" | sed 's%@OUTPUT@%'"$output"'%g'`
+ finalize_command=`echo "$finalize_command" | sed 's%@OUTPUT@%'"$output"'%g'`
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$compile_command"
+ $run $compile_command
+ status=$?
+
+ # If we failed to link statically, then try again.
+ if test $status -ne 0 && test -n "$link_static"; then
+ echo "$progname: cannot link \`$output' statically; retrying semi-dynamically" 1>&2
+ compile_command=`echo "$compile_command " | sed -e "s% $link_static % %" -e 's/ $//'`
+ $show "$compile_command"
+ $run $compile_command
+ status=$?
+ fi
+ exit $status
fi
# Replace the output file specification.
if test -n "$shlibpath_var"; then
# We should set the shlibpath_var
- rpath=
- for dir in $temp_rpath; do
- case "$dir" in
- /*)
- # Absolute path.
- rpath="$rpath$dir:"
- ;;
- *)
- # Relative path: add a thisdir entry.
- rpath="$rpath\$thisdir/$dir:"
- ;;
- esac
- done
- temp_rpath="$rpath"
+ rpath=
+ for dir in $temp_rpath; do
+ case "$dir" in
+ /*)
+ # Absolute path.
+ rpath="$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath="$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath="$rpath"
fi
# Delete the old output file.
$run $rm $output
if test -n "$compile_shlibpath"; then
- compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command"
+ compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command"
fi
if test -n "$finalize_shlibpath"; then
- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
fi
if test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
- finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
+ finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
fi
case "$hardcode_action" in
relink)
- # AGH! Flame the AIX and HP-UX people for me, will ya?
- echo "$progname: warning: using a buggy system linker" 1>&2
- echo "$progname: relinking will be required before \`$output' can be installed" 1>&2
- ;;
+ # AGH! Flame the AIX and HP-UX people for me, will ya?
+ echo "$progname: warning: using a buggy system linker" 1>&2
+ echo "$progname: relinking will be required before \`$output' can be installed" 1>&2
+ ;;
esac
$show "$compile_command"
# Only actually do things if our run command is non-null.
if test -z "$run"; then
- $rm $output
- trap "$rm $output; exit 1" 1 2 15
+ $rm $output
+ trap "$rm $output; exit 1" 1 2 15
- cat > $output <<EOF
+ cat > $output <<EOF
#! /bin/sh
# $output - temporary wrapper script for $objdir/$output
export PATH
EOF
- # Export our shlibpath_var if we have one.
- if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- cat >> $output <<EOF
+ # Export our shlibpath_var if we have one.
+ if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ cat >> $output <<EOF
# Add our own library path to $shlibpath_var
$shlibpath_var="$temp_rpath\$$shlibpath_var"
export $shlibpath_var
EOF
- fi
+ fi
cat >> $output <<EOF
fi
fi
EOF
- chmod +x $output
+ chmod +x $output
fi
exit 0
;;
oldlib="$objdir/$libname.a"
# Transform .lo files to .o files.
- oldobjs="$objs"`echo "$libobjs " | sed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
+ oldobjs="$objs"`echo "$libobjs " | sed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
if test -d "$objdir"; then
- $show "$rm $oldlib"
- $run $rm $oldlib
+ $show "$rm $oldlib"
+ $run $rm $oldlib
else
- $show "$mkdir $objdir"
- $run $mkdir $objdir
+ $show "$mkdir $objdir"
+ $run $mkdir $objdir
fi
# Do each command in the archive commands.
cmds=`eval echo \"$old_archive_cmds\"`
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
- $run eval "$cmd" || exit $?
+ $run eval "$cmd" || exit $?
done
IFS="$save_ifs"
fi
# Only create the output if not a dry run.
if test -z "$run"; then
- cat > $output <<EOF
+ cat > $output <<EOF
# $output - a libtool library file
# Generated by ltmain.sh - GNU $PACKAGE $VERSION
do
if test -n "$dest"; then
files="$files $dest"
- dest="$arg"
- continue
+ dest="$arg"
+ continue
fi
case "$arg" in
-m) prev="-m" ;;
-o) prev="-o" ;;
-s)
- stripme=" -s"
- continue
- ;;
+ stripme=" -s"
+ continue
+ ;;
-*) ;;
*)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest="$arg"
- continue
- fi
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ continue
+ fi
;;
esac
install_prog="$install_prog $arg"
if test -z "$dest"; then
echo "$progname: no file or destination specified" 1>&2
else
- echo "$progname: you must specify a destination" 1>&2
+ echo "$progname: you must specify a destination" 1>&2
fi
echo "$help" 1>&2
exit 1
if test $# -gt 2; then
echo "$progname: \`$dest' is not a directory" 1>&2
echo "$help" 1>&2
- exit 1
+ exit 1
fi
fi
case "$destdir" in
/*) ;;
*)
for file in $files; do
- case "$file" in
- *.lo) ;;
- *)
- echo "$progname: \`$destdir' must be an absolute directory name" 1>&2
- echo "$help" 1>&2
- exit 1
- ;;
- esac
+ case "$file" in
+ *.lo) ;;
+ *)
+ echo "$progname: \`$destdir' must be an absolute directory name" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
done
;;
esac
# Do each installation.
case "$file" in
*.a)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
*.la)
- # Check to see that this really is a libtool archive.
- if egrep "^# Generated by ltmain.sh" $file >/dev/null 2>&1; then :
- else
- echo "$progname: \`$file' is not a valid libtool archive" 1>&2
- echo "$help" 1>&2
- exit 1
- fi
-
- library_names=
- old_library=
- # If there is no directory component, then add one.
- case "$file" in
- */*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "$destdir" = "$libdir"; then
- case "$current_libdirs " in
- "* $libdir *") ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- "* $libdir *") ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- dir="`echo "$file" | sed 's%/[^/]*$%%'`/"
- test "$dir" = "$file/" && dir=
- dir="$dir$objdir"
-
- # See the names of the shared library.
- set dummy $library_names
- if test -n "$2"; then
- realname="$2"
- shift
- shift
-
- # Install the shared library and build the symlinks.
- $show "$install_prog $dir/$realname $destdir/$realname"
- $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
- test "X$dlname" = "X$realname" && dlname=
-
- # Support stripping libraries.
- if test -n "$stripme"; then
- if test -n "$striplib"; then
- $show "$striplib $destdir/$realname"
- $run $striplib $destdir/$realname || exit $?
- else
- echo "$progname: warning: no library stripping program" 1>&2
- fi
- fi
+ # Check to see that this really is a libtool archive.
+ if egrep "^# Generated by ltmain.sh" $file >/dev/null 2>&1; then :
+ else
+ echo "$progname: \`$file' is not a valid libtool archive" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi
+
+ library_names=
+ old_library=
+ # If there is no directory component, then add one.
+ case "$file" in
+ */*) . $file ;;
+ *) . ./$file ;;
+ esac
- if test $# -gt 0; then
- # Delete the old symlinks.
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "$destdir" = "$libdir"; then
+ case "$current_libdirs " in
+ "* $libdir *") ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ "* $libdir *") ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir="`echo "$file" | sed 's%/[^/]*$%%'`/"
+ test "$dir" = "$file/" && dir=
+ dir="$dir$objdir"
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname="$2"
+ shift
+ shift
+
+ # Install the shared library and build the symlinks.
+ $show "$install_prog $dir/$realname $destdir/$realname"
+ $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
+ test "X$dlname" = "X$realname" && dlname=
+
+ # Support stripping libraries.
+ if test -n "$stripme"; then
+ if test -n "$striplib"; then
+ $show "$striplib $destdir/$realname"
+ $run $striplib $destdir/$realname || exit $?
+ else
+ echo "$progname: warning: no library stripping program" 1>&2
+ fi
+ fi
+
+ if test $# -gt 0; then
+ # Delete the old symlinks.
rmcmd="$rm"
for linkname
do
$show "$rmcmd"
$run $rmcmd
- # ... and create new ones.
- for linkname
- do
- test "X$dlname" = "X$linkname" && dlname=
- $show "(cd $destdir && $LN_S $realname $linkname)"
- $run eval "(cd $destdir && $LN_S $realname $linkname)"
- done
- fi
+ # ... and create new ones.
+ for linkname
+ do
+ test "X$dlname" = "X$linkname" && dlname=
+ $show "(cd $destdir && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $LN_S $realname $linkname)"
+ done
+ fi
+
+ if test -n "$dlname"; then
+ # Install the dynamically-loadable library.
+ $show "$install_prog $dir/$dlname $destdir/$dlname"
+ $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ cmds=`eval echo \"$postinstall_cmds\"`
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
- if test -n "$dlname"; then
- # Install the dynamically-loadable library.
- $show "$install_prog $dir/$dlname $destdir/$dlname"
- $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
- fi
+ # Install the pseudo-library for information purposes.
+ name=`echo "$file" | sed 's%^.*/%%'`
+ $show "$install_prog $file $destdir/$name"
+ $run $install_prog $file $destdir/$name || exit $?
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- cmds=`eval echo \"$postinstall_cmds\"`
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- # Install the pseudo-library for information purposes.
- name=`echo "$file" | sed 's%^.*/%%'`
- $show "$install_prog $file $destdir/$name"
- $run $install_prog $file $destdir/$name || exit $?
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
*.lo)
# Install (i.e. copy) a libtool object.
# Figure out destination file name, if it wasn't already specified.
if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`echo "$file" | sed 's%^.*/%%'`
- destfile="$destdir/$destfile"
+ destfile="$destdir/$destname"
+ else
+ destfile=`echo "$file" | sed 's%^.*/%%'`
+ destfile="$destdir/$destfile"
fi
- # Deduce the name of the destination old-style object file.
- case "$destfile" in
- *.lo)
- staticdest=`echo "$destfile" | sed 's/\.lo$/\.o/'`
- ;;
- *.o)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- echo "$progname: cannot copy a libtool object to \`$destfile'" 1>&2
- echo "$help" 1>&2
- exit 1
+ # Deduce the name of the destination old-style object file.
+ case "$destfile" in
+ *.lo)
+ staticdest=`echo "$destfile" | sed 's/\.lo$/\.o/'`
+ ;;
+ *.o)
+ staticdest="$destfile"
+ destfile=
;;
- esac
+ *)
+ echo "$progname: cannot copy a libtool object to \`$destfile'" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
- # Install the libtool object if requested.
- if test -n "$destfile"; then
- $show "$install_prog $file $destfile"
- $run $install_prog $file $destfile || exit $?
- fi
+ # Install the libtool object if requested.
+ if test -n "$destfile"; then
+ $show "$install_prog $file $destfile"
+ $run $install_prog $file $destfile || exit $?
+ fi
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- staticobj=`echo "$file" | sed 's/\.lo$/\.o/'`
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=`echo "$file" | sed 's/\.lo$/\.o/'`
- $show "$install_prog $staticobj $staticdest"
- $run $install_prog $staticobj $staticdest || exit $?
- fi
- exit 0
- ;;
+ $show "$install_prog $staticobj $staticdest"
+ $run $install_prog $staticobj $staticdest || exit $?
+ fi
+ exit 0
+ ;;
*)
- # Do a test to see if this is really a libtool program.
- if egrep "^# Generated by ltmain.sh" $file >/dev/null 2>&1; then
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
- link_against_libtool_libs=
- finalize_command=
-
- # If there is no directory component, then add one.
- case "$file" in
- */*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Check the variables that should have been set.
- if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then
- echo "$progname: invalid libtool wrapper script \`$file'" 1>&2
- exit 1
- fi
+ # Do a test to see if this is really a libtool program.
+ if egrep "^# Generated by ltmain.sh" $file >/dev/null 2>&1; then
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+ link_against_libtool_libs=
+ finalize_command=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */*) . $file ;;
+ *) . ./$file ;;
+ esac
- finalize=yes
- for lib in $link_against_libtool_libs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- # If there is no directory component, then add one.
- case "$lib" in
- */*) . $lib ;;
- *) . ./$lib ;;
- esac
- fi
- libfile="$libdir/`echo "$lib" | sed 's%^.*/%%g'`"
- if test -z "$libdir"; then
- echo "$progname: warning: \`$lib' contains no -rpath information" 1>&2
- elif test -f "$libfile"; then :
- else
- echo "$progname: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
- finalize=no
- fi
- done
-
- if test "$hardcode_action" = relink; then
- if test "$finalize" = yes; then
- echo "$progname: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
- $show "$finalize_command"
- if $run $finalize_command; then :
- else
- echo "$progname: error: relink \`$file' with the above command before installing it" 1>&2
- continue
- fi
- file="$objdir/$file"T
- else
- echo "$progname: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
- fi
- else
- # Install the binary that we compiled earlier.
- dir=`echo "$file" | sed 's%/[^/]*$%%'`
- if test "$file" = "$dir"; then
- file="$objdir/$file"
- else
- file="$dir/$objdir/`echo "$file" | sed 's%^.*/%%'`"
- fi
- fi
- fi
+ # Check the variables that should have been set.
+ if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then
+ echo "$progname: invalid libtool wrapper script \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=yes
+ for lib in $link_against_libtool_libs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case "$lib" in
+ */*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile="$libdir/`echo "$lib" | sed 's%^.*/%%g'`"
+ if test -z "$libdir"; then
+ echo "$progname: warning: \`$lib' contains no -rpath information" 1>&2
+ elif test -f "$libfile"; then :
+ else
+ echo "$progname: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ done
+
+ if test "$hardcode_action" = relink; then
+ if test "$finalize" = yes; then
+ echo "$progname: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
+ $show "$finalize_command"
+ if $run $finalize_command; then :
+ else
+ echo "$progname: error: relink \`$file' with the above command before installing it" 1>&2
+ continue
+ fi
+ file="$objdir/$file"T
+ else
+ echo "$progname: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
+ dir=`echo "$file" | sed 's%/[^/]*$%%'`
+ if test "$file" = "$dir"; then
+ file="$objdir/$file"
+ else
+ file="$dir/$objdir/`echo "$file" | sed 's%^.*/%%'`"
+ fi
+ fi
+ fi
- $show "$install_prog$stripme $file $dest"
- $run $install_prog$stripme $file $dest || exit $?
- ;;
+ $show "$install_prog$stripme $file $dest"
+ $run $install_prog$stripme $file $dest || exit $?
+ ;;
esac
done
# Support stripping libraries.
if test -n "$stripme"; then
- if test -n "$old_striplib"; then
- $show "$old_striplib $oldlib"
- $run $old_striplib $oldlib || exit $?
- else
- echo "$progname: warning: no static library stripping program" 1>&2
- fi
+ if test -n "$old_striplib"; then
+ $show "$old_striplib $oldlib"
+ $run $old_striplib $oldlib || exit $?
+ else
+ echo "$progname: warning: no static library stripping program" 1>&2
+ fi
fi
# Do each command in the postinstall commands.
cmds=`eval echo \"$old_postinstall_cmds\"`
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
if test -n "$finish_cmds" && test -n "$libdirs"; then
for dir
do
- libdirs="$libdirs $dir"
+ libdirs="$libdirs $dir"
done
for libdir in $libdirs; do
- # Do each command in the postinstall commands.
- cmds=`eval echo \"$finish_cmds\"`
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd"
- done
- IFS="$save_ifs"
+ # Do each command in the postinstall commands.
+ cmds=`eval echo \"$finish_cmds\"`
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ done
+ IFS="$save_ifs"
done
fi
case "$name" in
*.la)
- # Possibly a libtool archive, so verify it.
- if egrep "^# Generated by ltmain.sh" $file >/dev/null 2>&1; then
- . $dir/$name
-
- # Delete the libtool libraries and symlinks.
- for n in $library_names; do
- rmfiles="$rmfiles $dir/$n"
- test "X$n" = "X$dlname" && dlname=
- done
- test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
- test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
-
- # FIXME: should reinstall the best remaining shared library.
- fi
- ;;
+ # Possibly a libtool archive, so verify it.
+ if egrep "^# Generated by ltmain.sh" $file >/dev/null 2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $dir/$n"
+ test "X$n" = "X$dlname" && dlname=
+ done
+ test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
+ test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
+
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ ;;
*.lo)
- if test "$build_old_libs" = yes; then
- oldobj=`echo "$name" | sed 's/\.lo$/\.o/'`
- rmfiles="$rmfiles $dir/$oldobj"
- fi
- ;;
+ if test "$build_old_libs" = yes; then
+ oldobj=`echo "$name" | sed 's/\.lo$/\.o/'`
+ rmfiles="$rmfiles $dir/$oldobj"
+ fi
+ ;;
esac
$show "$rm $rmfiles"
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-static do not do any dynamic linking or shared library creation
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.