if test -z "$LN_S"; then
# Check to see if we can use ln -s, or we need hard links.
echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
- $rm conftestdata
- if ln -s X conftestdata 2>/dev/null; then
- $rm conftestdata
+ $rm conftest.dat
+ if ln -s X conftest.dat 2>/dev/null; then
+ $rm conftest.dat
LN_S="ln -s"
else
LN_S=ln
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
- /* | [A-Za-z]:[\\/]*)
+ [\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
export_dynamic_flag_spec=
whole_archive_flag_spec=
thread_safe_flag_spec=
-hardcode_into_libs=no
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
echo "$ac_t$ld_shlibs" 1>&6
test "$ld_shlibs" = no && can_build_shared=no
+if test -z "$NM"; then
+ echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
+ case "$NM" in
+ [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -B"
+ break
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -p"
+ break
+ else
+ NM=${NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$NM" && NM=nm
+ ;;
+ esac
+ echo "$ac_t$NM" 1>&6
+fi
+
# Check for command to grab the raw symbol name followed by C symbol from nm.
echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
#endif
EOF
# Now try linking the two files.
- mv conftest.$objext conftestm.$objext
+ mv conftest.$objext conftstm.$objext
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
- LIBS="conftestm.$objext"
+ LIBS="conftstm.$objext"
CFLAGS="$CFLAGS$no_builtin_flag"
if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes
echo "$progname: failed program was:" >&5
cat conftest.c >&5
fi
- $rm conftest*
+ $rm conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
if test "$pipe_works" = yes; then
echo "checking whether to build static libraries... $enable_static" 1>&6
-if test "$hardcode_action" = relink || test "$hardcode_into_libs" = yes; then
+if test "$hardcode_action" = relink; then
# Fast installation is not supported
enable_fast_install=no
elif test "$shlibpath_overrides_runpath" = yes ||
# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
;;
# libtool link mode
- link | relink)
+ link)
modename="$modename: link"
- relink=no
- test "$mode" = "relink" && relink=yes
- libtool_args="$nonopt"
C_compiler="$CC" # save it, to compile generated C sources
CC="$nonopt"
case "$host" in
while test $# -gt 0; do
arg="$1"
shift
- libtool_args="$libtool_args $arg"
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
rpath | xrpath)
# We need an absolute path.
case "$arg" in
- /* | [A-Za-z]:[/\\]*) ;;
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
exit 1
fi
# We need an absolute path.
case "$dir" in
- /* | [A-Za-z]:[/\\]*) ;;
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
# We need an absolute path.
case "$dir" in
- /* | [A-Za-z]:[/\\]*) ;;
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
exit 1
fi
fi
- if test "$relink" = no; then
- # Create the output directory, or remove our outputs if we need to.
- if test -d $output_objdir; then
- $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
- $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
- else
- $show "$mkdir $output_objdir"
- $run $mkdir $output_objdir
- status=$?
- if test $status -ne 0 && test ! -d $output_objdir; then
- exit $status
- fi
+ # Create the output directory, or remove our outputs if we need to.
+ if test -d $output_objdir; then
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ else
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
fi
fi
test "X$ladir" = "X$lib" && ladir="."
# We need an absolute path.
case "$ladir" in
- /* | [A-Za-z]:[/\\]*) abs_ladir="$ladir" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
*)
abs_ladir=`cd "$ladir" && pwd`
if test -z "$abs_ladir"; then
if test "$build_libtool_libs" = yes && test -n "$library_names"; then
# This is a shared library
- if test "$hardcode_into_libs" = yes; then
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- case " $sys_lib_dlsearch_path " in
- *" $absdir "*) ;;
- *)
- case "$compile_rpath " in
- *" $absdir "*) ;;
- *) compile_rpath="$compile_rpath $absdir"
- esac
- ;;
- esac
- case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
- *)
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir"
- esac
- ;;
- esac
- fi
-
if test -n "$old_archive_from_expsyms_cmds"; then
# figure out the soname
set dummy $library_names
add_dir=
add_shlibpath=
add_name=no
- if test "$relink" = no; then
- lib_linked=yes
- case "$hardcode_action" in
- immediate | unsupported)
- if test "$hardcode_direct" = no; then
- deplibs="$deplibs $dir/$linklib"
- elif test "$hardcode_minus_L" = no; then
- case "$host" in
- *-*-sunos*) add_shlibpath="$dir" ;;
- esac
- add_dir="-L$dir"
- add_name=yes
- elif test "$hardcode_shlibpath_var" = no; then
- add_shlibpath="$dir"
- add_name=yes
- else
- lib_linked=no
- fi
- ;;
- relink)
- if test "$hardcode_direct" = yes; then
- deplibs="$deplibs $dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
- add_name=yes
- elif test "$hardcode_shlibpath_var" = yes; then
- add_shlibpath="$dir"
- add_name=yes
- else
- lib_linked=no
- fi
- ;;
- *) lib_linked=no ;;
- esac
-
- if test "$lib_linked" != yes; then
- $echo "$modename: configuration error: unsupported hardcode properties"
- exit 1
- fi
- if test -n "$add_shlibpath"; then
- case ":$compile_shlibpath:" in
- *":$add_shlibpath:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ lib_linked=yes
+ case "$hardcode_action" in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ deplibs="$deplibs $dir/$linklib"
+ elif test "$hardcode_minus_L" = no; then
+ case "$host" in
+ *-*-sunos*) add_shlibpath="$dir" ;;
esac
+ add_dir="-L$dir"
+ add_name=yes
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add_name=yes
+ else
+ lib_linked=no
fi
- else
- # Install command for both is simple: just hardcode it.
+ ;;
+ relink)
if test "$hardcode_direct" = yes; then
- deplibs="$deplibs $libdir/$linklib"
+ deplibs="$deplibs $dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$libdir"
+ add_dir="-L$dir"
add_name=yes
elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
add_name=yes
else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- add_name=yes
+ lib_linked=no
fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ $echo "$modename: configuration error: unsupported hardcode properties"
+ exit 1
fi
- if test "$hardcode_direct" != yes && \
- test "$hardcode_minus_L" != yes && \
- test "$hardcode_shlibpath_var" = yes; then
- case ":$finalize_shlibpath:" in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
+ if test -n "$add_shlibpath"; then
+ case ":$compile_shlibpath:" in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
fi
if test -n "$add_dir"; then
case "$deplibs " in
while test -h "$potlib" 2>/dev/null; do
potliblink=`ls -ld $potlib | sed 's/.* -> //'`
case "$potliblink" in
- /*) potlib="$potliblink";;
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
esac
fi
- if test "$hardcode_into_libs" = yes; then
- # Hardcode the library paths
- hardcode_libdirs=
- dep_rpath=
- rpath="$finalize_rpath"
- test "$relink" = no && rpath="$compile_rpath$rpath"
- for libdir in $rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- dep_rpath="$dep_rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
- fi
- test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
- fi
-
- shlibpath="$finalize_shlibpath"
- test "$relink" = no && shlibpath="$compile_shlibpath$shlibpath"
- if test -n "$shlibpath"; then
- eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ if test -n "$compile_shlibpath"; then
+ eval "$shlibpath_var='$compile_shlibpath\$$shlibpath_var'; export $shlibpath_var"
fi
# Get the real and link names of the library.
for xlib in $convenience; do
# Extract the objects.
case "$xlib" in
- /* | [A-Za-z]:[/\\]*) xabs="$xlib" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
fi
- # Make a backup of the uninstalled library when relinking
- if test "$relink" = yes && test "$hardcode_into_libs" = yes ; then
- $run eval '(cd $output_objdir && $rm "$realname"U && $mv $realname "$realname"U)' || exit $?
- fi
-
# Do each of the archive commands.
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
eval cmds=\"$archive_expsym_cmds\"
done
IFS="$save_ifs"
- # Restore the uninstalled library and exit
- if test "$relink" = yes && test "$hardcode_into_libs" = yes; then
- $run eval '(cd $output_objdir && $rm "$realname"T && $mv $realname "$realname"T && $mv "$realname"U $realname)' || exit $?
- exit 0
- fi
-
# Create links to the real library.
for linkname in $linknames; do
if test "$realname" != "$linkname"; then
test "X$ladir" = "X$lib" && ladir="."
# We need an absolute path.
case "$ladir" in
- /* | [A-Za-z]:[/\\]*) abs_ladir="$ladir" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
*)
abs_ladir=`cd "$ladir" && pwd`
if test -z "$abs_ladir"; then
continue
fi
- hardcode=yes
- test "$hardcode_into_libs" = yes && test "$alldeplibs" = yes && hardcode=no
-
- if test "$hardcode" = yes && \
- test "$build_libtool_libs" = yes && \
- test -n "$library_names"; then
+ if test "$build_libtool_libs" = yes && test -n "$library_names"; then
# We need to hardcode the library path
if test -n "$shlibpath_var"; then
# Make sure the rpath contains only unique directories.
rpath=
for dir in $temp_rpath; do
case "$dir" in
- /* | [A-Za-z]:[/\\]*)
+ [\\/]* | [A-Za-z]:[\\/]*)
# Absolute path.
rpath="$rpath$dir:"
;;
fi
fi
- if test "$hardcode_action" = relink || test "$hardcode_into_libs" = yes; then
+ if test "$hardcode_action" = relink; then
# Fast installation is not supported
link_command="$compile_var$compile_command$compile_rpath"
relink_command="$finalize_var$finalize_command$finalize_rpath"
# Quote $echo for shipping.
if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
case "$0" in
- /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";;
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
esac
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
# If there was a directory component, then change thisdir.
if test \"x\$destdir\" != \"x\$file\"; then
case \"\$destdir\" in
- /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
*) thisdir=\"\$thisdir/\$destdir\" ;;
esac
fi
for xlib in $addlibs; do
# Extract the objects.
case "$xlib" in
- /* | [A-Za-z]:[/\\]*) xabs="$xlib" ;;
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
test "$build_old_libs" = yes && old_library="$libname.$libext"
$show "creating $output"
- # Quote the link command for shipping.
- relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-
# Only create the output if not a dry run.
if test -z "$run"; then
for installed in no yes; do
installed=$installed
# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
- if test "$installed" = no; then
- $echo >> $output "\
-relink_command=\"$relink_command\""
- fi
+libdir='$install_libdir'\
+"
done
fi
fi
fi
case "$destdir" in
- /* | [A-Za-z]:[/\\]*) ;;
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
*)
for file in $files; do
case "$file" in
exit 1
fi
- relink_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 "$relink_command"; then
- $echo "$modename: invalid libtool pseudo library \`$file'" 1>&2
- exit 1
- fi
-
- finalize=yes
- link_against_libtool_libs="$dependency_libs"
- for lib in $link_against_libtool_libs; do
- case "$lib" in
- *.la)
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- case "$lib" in
- */* | *\\*) . $lib ;;
- *) . ./$lib
- esac
- fi
- libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
- if test -n "$libdir" && test ! -f "$libfile"; then
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
- finalize=no
- fi
- ;;
- esac
- done
-
- relink_command=
library_names=
old_library=
- dependency_libs=
# If there is no directory component, then add one.
case "$file" in
*/* | *\\*) . $file ;;
test "X$dir" = "X$file/" && dir=
dir="$dir$objdir"
- if test "$hardcode_into_libs" = yes; then
- if test "$finalize" = yes; then
- $echo "$modename: warning: relinking \`$file'" 1>&2
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- continue
- fi
- else
- $echo "$modename: error: cannot relink \`$file'" 1>&2
- continue
- fi
- fi
-
# See the names of the shared library.
set dummy $library_names
if test -n "$2"; then
shift
shift
- srcname="$realname"
- test "$hardcode_into_libs" = yes && srcname="$realname"T
-
# Install the shared library and build the symlinks.
- $show "$install_prog $dir/$srcname $destdir/$realname"
- $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+ $show "$install_prog $dir/$realname $destdir/$realname"
+ $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
test "X$dlname" = "X$realname" && dlname=
if test $# -gt 0; then
fi
done
- relink_command=
- # If there is no directory component, then add one.
- case "$file" in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
outputname=
if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes && test -z "$run"; then