Please do not send any bug reports or questions about it to public
forums (such as GNU newsgroups), send them directly to the libtool
mailing list <bug-libtool@gnu.ai.mit.edu>.
+
+CALL FOR HELP: In order to implement dlopening even on archictectures
+that don't have shared libraries, I am collecting `NM' and
+`global_symbol_pipe' values for every known operating system.
+
+If ltconfig on your system says that it found the command to parse NM
+output, then you don't need to look any further:
+
+checking command to parse NM output... yes
+
+Otherwise, I would very much appreciate hearing about the combination
+of `NM' and `global_symbol_pipe' that ltconfig needs to use in order
+to pass this test.
+
+`NM' is set by ltconfig to be an nm program that gives BSD-compatible
+symbol output, such as:
+
+$ nm assert-perr.o
+ U _IO_stderr_
+00000000 T __assert_perror_fail
+ U __assert_program_name
+ U abort
+ U fflush
+ U fprintf
+ U strerror
+
+If your OS's nm cannot produce output like this, that's still okay,
+but, for simplicity, I prefer using this kind of output.
+
+Then, global_symbol_pipe is a command that takes all exported symbols,
+including undefined ones, and produces a two-column list of them. The
+contents of the first column are the raw symbol name, and the second
+column contains the name needed to access the symbols from a C
+program.
+
+So, on most OSes, this will be a command like:
+$ nm assert-perr.o | \
+ sed -e '/^.* [BCDEGRSTU] /!d' -e 's/^.* [BCDEGRSTU] \(.*\)$/\1 \1/'
+_IO_stderr_ _IO_stderr_
+__assert_perror_fail __assert_perror_fail
+__assert_program_name __assert_program_name
+abort abort
+fflush fflush
+fprintf fprintf
+strerror strerror
+
+On some OSes, the C symbols will need to strip a leading underscore:
+
+__IO_stderr_ _IO_stderr_
+___assert_perror_fail __assert_perror_fail
+___assert_program_name __assert_program_name
+_abort abort
+_fflush fflush
+_fprintf fprintf
+_strerror strerror
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
-# serial 11 AM_PROG_LIBTOOL
+# serial 12 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_RANLIB])
])
AC_DEFUN(AM_PROG_LD_GNU,
-[AC_CACHE_CHECK([whether we are using GNU ld], ac_cv_prog_gnu_ld,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
ac_cv_prog_gnu_ld=yes
else
ac_cv_prog_gnu_ld=no
# echo "$something" | sed 's/\\/\\\\/g'
# So, we emulate echo with printf '%s\n'
echo='printf %s\n'
- if test X`$echo '\t'` = 'X\t'; then :
+ if test "X`$echo '\t'`" = 'X\t'; then :
else
# Oops. We have no working printf. Try to find a not-so-buggy echo.
echo=echo
save_PATH="$PATH"
PATH="$PATH":/usr/ucb
for dir in $PATH; do
- if test -f $dir/echo && test X`$dir/echo '\t'` = 'X\t'; then
+ if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then
echo="$dir/echo"
break
fi
# link it into a program.
if test "$build_libtool_libs" != yes; then
$show "$echo timestamp > $libobj"
- $run eval "$echo timestamp > \$libobj" || exit $?
+ $run eval "\$echo timestamp > \$libobj" || exit $?
fi
exit 0
-export-dynamic)
if test "$export_dynamic" != yes; then
export_dynamic=yes
- arg=`eval $echo "$export_dynamic_flag_spec"`
+ arg=`eval \$echo "$export_dynamic_flag_spec"`
# Add the symbol object into the linking commands.
compile_command="$compile_command @SYMFILE@"
fi
if test -n "$libdir"; then
- flag=`eval $echo \"$hardcode_libdir_flag_spec\"`
+ flag=`eval \$echo \"$hardcode_libdir_flag_spec\"`
compile_command="$compile_command $flag"
finalize_command="$finalize_command $flag"
if test "$build_libtool_libs" = yes; then
# Get the real and link names of the library.
- library_names=`eval $echo \"$library_names_spec\"`
+ 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\"`
+ soname=`eval \$echo \"$soname_spec\"`
else
soname="$realname"
fi
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\"`
+ cmds=`eval \$echo \"$archive_cmds\"`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
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\"`
+ cmds=`eval \$echo \"$reload_cmds\"`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
# 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 $?
+ $run eval "\$echo timestamp > $libobj" || exit $?
exit 0
fi
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs"
output="$libobj"
- cmds=`eval $echo \"$reload_cmds\"`
+ cmds=`eval \$echo \"$reload_cmds\"`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
fi
# Do each command in the archive commands.
- cmds=`eval $echo \"$old_archive_cmds\"`
+ cmds=`eval \$echo \"$old_archive_cmds\"`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
# Do each command in the postinstall commands.
lib="$destdir/$realname"
- cmds=`eval $echo \"$postinstall_cmds\"`
+ cmds=`eval \$echo \"$postinstall_cmds\"`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
fi
# Do each command in the postinstall commands.
- cmds=`eval $echo \"$old_postinstall_cmds\"`
+ cmds=`eval \$echo \"$old_postinstall_cmds\"`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
for libdir in $libdirs; do
# Do each command in the postinstall commands.
- cmds=`eval $echo \"$finish_cmds\"`
+ cmds=`eval \$echo \"$finish_cmds\"`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
exit 1
else
# Display what would be done.
- eval "$echo \"\$shlibpath_var=\$$shlibpath_var\""
+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
$echo "export $shlibpath_var"
$echo "$cmd$args"
exit 0