+Tue Oct 14 10:19:18 1997 Gordon Matzigkeit <gord@gnu.org>
+
+ * ltmain.in (link): Added a bit more inter-language support to the
+ symbol file generation process.
+
+Thu Oct 9 12:56:13 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * ltmain.in (link): Change the wrapper script to follow symlinks
+ in order to find thisdir. This should put the final nail in the
+ coffin for problems with wrapper scripts. From Ian Lance Taylor.
+
+Tue Oct 7 10:49:29 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * ltmain.in: Change a few `$echo' commands into `$show' to make
+ --silent mode behave as advertised.
+
+ * ltconfig.in (allow_undefined_flag): On OSF/1 4.x, use
+ `-expect_unresolved \*'. From Christian Mondrup.
+
+ * ltmain.in (install): Change install mode to allow a specified
+ /bin/sh argument at the beginning of the install_prog. Also,
+ specify the shell to run when invoking libtool recursively for
+ finish mode. From Chris Provenzano.
+
+ * libtool.m4 (LIBTOOL): Change definition to include $(SHELL).
+ From Chris Provenzano.
+
+ * ltconfig.in: Port to UTS 4.x. From Alistair Crooks.
+
+ * demo/Makefile.am (hc-libflag): Add rules to make this binary for
+ hardcode.test.
+
+Wed Sep 24 19:54:53 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * ltconfig.in (LD): As with libtool.m4, don't override LD.
+ Do a whole bunch of ac_t quoting.
+
+Wed Sep 24 11:11:01 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libtool.m4 (AM_PROG_LD): Don't override LD in the environment.
+
+Sun Sep 21 13:13:06 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * libtool.m4, ltconfig.in (NM): Arguments to the for loop must be
+ whitespace separated. This fixes a bug under FreeBSD's /bin/sh.
+ From George Scott.
+
+Sat Sep 20 13:59:47 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * ltmain.in (deplibs): When building shared libraries, always add
+ -lc to deplibs. Reported by Andreas Jellinghaus.
+
Mon Sep 15 07:08:35 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+ * ltconfig.in, ltmain.in (COLLECT_NAMES): If the COLLECT_NAMES
+ environment variable has not been set, set it to empty. This
+ apparently fixes the AIX bug with GCC's collect2. Reported by
+ Mark Kettenis.
+
* demo/Makefile.am, ltmain.in, tests/hardcode.test (objdir):
Changed objdir variable .libs to _libs. This is another MS-DOS
portability fix. Suggested by Robert Hoehne.
New in 1.0c:
* Bug fixes.
+* Portability fixes for Windows NT.
* Change the libtool temporary directory from `.libs' to `_libs' in
order to cope with MS-DOS filenames. See README-alpha.
* New `-all-static' flag to prevent any dynamic linking. The regular
* Allow configure.in to change the defaults for AM_PROG_LIBTOOL's
`--enable-shared' and `--enable-static' flags by setting
the `enable_shared' or `enable_static' shell variables to `no'.
+* Support for UTS 4.x.
\f
New in 1.0:
* Bug fixes.
SCO OpenServer 5.x (*-*-sco3.2v5*)
Solaris 2.x (*-*-solaris2*)
SunOS 4.x, a.k.a. Solaris 1.x (*-*-sunos4*)
+ UTS 4.x (*-*-uts4*)
All ELF targets that use both the GNU C compiler (gcc) and GNU ld
See the file NEWS for a description of recent changes to libtool.
* Document `execute' mode, and the experimental nature of -dlopen and
-dlpreopen.
+Franc,ois Pinard about debugging:
+
+``Another thing I'm curious to experiment is how will `gdb' perform
+with shared libraries. There are a few notes in the manual about
+generating a "more easy to debug" version of the program. I tried the
+recipe, but it broke somewhere in Automake generated dependency code,
+so I got to remove it for now. However, the manual does not explain
+what the debugging difficulty is, and so, I wonder what problems I
+will meet.''
+
* Some packages, such as GIMP, choose to put a note about
`--disable-shared' in their README:
Perhaps a similar note could be added to ABOUT-NLS.
I'll add a suggestion to the libtool documentation, so that other
-maintainers add this kind of note to their package documentation.
+maintainers add this kind of note to their package documentation. The
+biggest motivation, mentioned by Franc,ois Pinard, is to turn off
+double-compilation.
* Bengt Martensson says:
dnl Process this file with autoconf to create configure.
AC_INIT(ltmain.in)
-AM_INIT_AUTOMAKE(libtool,1.0c)
+AM_INIT_AUTOMAKE(libtool,1.0d)
pkgdatadir='${datadir}/libtool'
AC_SUBST(pkgdatadir)
EXTRA_DIST = $(TESTS) acinclude.m4
-hardcode_tests = hc-direct hc-libpath hc-minusL
+hardcode_tests = hc-direct hc-libflag hc-libpath hc-minusL
CLEANFILES = $(hardcode_tests)
# Build a libtool library, libhello.la for installation in libdir.
echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) || echo unsupported > $@"; \
eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) || echo unsupported > $@"
-hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
- @rm -f hc-minusL
- $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS)
+# We need to create an alias for $(objdir) so that this test works regardless
+# of $hardcode_minus_L
+hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES)
+ rm -rf hc-libflag _hclibs
+ mkdir _hclibs
+ cd _hclibs && for lib in ../$(objdir)/libhello*; do \
+ $(LN_S) $$lib `echo "$$lib" | sed 's%^.*/%%'` || exit 1; \
+ done
+ @eval `egrep -e '^(hardcode_.*|wl)=' ./libtool`; \
+ libdir=`pwd`/$(objdir); \
+ flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
+ if test -z "$$flag"; then \
+ echo "echo unsupported > $@"; \
+ echo unsupported > $@ || status="$$?"; \
+ else \
+ echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L./_hclibs -lhello $(LIBS)"; \
+ $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L./_hclibs -lhello $(LIBS) || status="$$?"; \
+ fi; \
+ echo "rm -rf _hclibs"; \
+ rm -rf _hclibs; \
+ exit $$status
hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES)
@rm -f hc-libpath
@eval `egrep -e '^shlibpath_var=' ./libtool`; \
echo "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) || echo unsupported > $@"; \
eval "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) || echo unsupported > $@"
+
+hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
+ @rm -f hc-minusL
+ $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS)
@item current
The most recent interface number that this library implements.
+@item revision
+The implementation number of the @var{current} interface.
+
@item age
The difference between the oldest and newest interfaces that this
library implements. In other words, the library implements all the
interface numbers in the range from number @code{@var{current} -
@var{age}} to @code{@var{current}}.
-
-@item revision
-The implementation number of the @var{current} interface.
@end table
If two libraries have identical @var{current} and @var{age} numbers,
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
-# serial 12 AM_PROG_LIBTOOL
+# serial 14 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_RANLIB])
AC_REQUIRE([AC_PROG_LN_S])
# Always use our own libtool.
-LIBTOOL='$(top_builddir)/libtool'
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)
dnl Allow the --disable-shared flag to stop us from building shared libs.
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(ac_cv_path_LD,
-[LD=${LD-$ac_prog}
-case "$LD" in
- /*)
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
- ;;
- *)
+[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
fi
done
IFS="$ac_save_ifs"
- ;;
-esac])
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
LD="$ac_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb:$PATH:/bin; do
+ for ac_dir in /usr/ucb $PATH /bin; do
test -z "$ac_dir" && dir=.
if test -f $ac_dir/nm; then
# Check to see if the nm accepts a BSD-compat flag.
# metacharacters that are still active within double-quoted strings.
sed_quote_subst='s/\([\\"$]\)/\\\1/g'
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "${COLLECT_NAMES+set}" != set; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+
# Global variables:
can_build_shared=yes
enable_shared=yes
fi ;;
esac
host=`$ac_config_sub $host_alias`
- echo "$ac_t""$host" 1>&6
+ echo "$ac_t$host" 1>&6
elif test -z "$host"; then
echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
done
IFS="$save_ifs"
- echo $ac_t "$result" 1>&6
+ echo "$ac_t$result" 1>&6
fi
if test -n "$RANLIB"; then
IFS="$save_ifs"
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$ac_t$CC" 1>&6
else
- echo "$ac_t""no" 1>&6
+ echo "$ac_t"no 1>&6
fi
fi
fi
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$ac_t$CC" 1>&6
else
- echo "$ac_t""no" 1>&6
+ echo "$ac_t"no 1>&6
fi
if test -z "$CC"; then
with_gcc=yes
fi
$rm conftest.c
- echo $ac_t "$with_gcc" 1>&6
+ echo "$ac_t$with_gcc" 1>&6
fi
# Allow CC to be a program name with arguments.
wl='-Qoption ld '
;;
+ uts4*)
+ pic_flag='-pic'
+ link_static_flag='-Bstatic'
+ ;;
+
*)
can_build_shared=no
;;
esac
if test -n "$pic_flag"; then
- echo $ac_t "$pic_flag" 1>&6
+ echo "$ac_t$pic_flag" 1>&6
# Check to make sure the pic_flag actually works.
echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
# On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
# reports no error. So, we need to grep stderr for (Bundled).
if grep '(Bundled)' conftest.err >/dev/null; then
- echo $ac_t no 1>&6
+ echo "$ac_t"no 1>&6
can_build_shared=no
pic_flag=
else
- echo $ac_t yes 1>&6
+ echo "$ac_t"yes 1>&6
pic_flag=" $pic_flag"
fi
else
cat conftest.err 1>&5
can_build_shared=no
pic_flag=
- echo $ac_t no 1>&6
+ echo "$ac_t"no 1>&6
fi
CFLAGS="$save_CFLAGS"
$rm conftest*
else
- echo $ac_t none 1>&6
+ echo "$ac_t"none 1>&6
fi
# Check for any special shared library compilation flags.
LDFLAGS="$LDFLAGS $link_static_flag"
echo "$progname:@LINENO@: checking if $compiler static flag $link_static_flag works" >&5
if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- echo $ac_t "$link_static_flag" 1>&6
+ echo "$ac_t$link_static_flag" 1>&6
else
- echo $ac_t none 1>&6
+ echo "$ac_t"none 1>&6
link_static_flag=
fi
LDFLAGS="$save_LDFLAGS"
fi
# Make sure LD is an absolute path.
-case "$LD" in
-/*) ;;
-*)
+if test -z "$LD"; then
ac_prog=ld
if test "$with_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "$progname:@LINENO@: checking for non-GNU ld" >&5
fi
- LD=${LD-$ac_prog}
- case "$LD" in
- /*)
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog"; then
- LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
+
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; then
+ LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
fi
- done
- IFS="$ac_save_ifs"
- ;;
- esac
- echo $ac_t "$with_gnu_ld" 1>&6
- ;;
-esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+
+ if test -n "$LD"; then
+ echo "$ac_t$LD" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+
+ if test -z "$LD"; then
+ echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
+ exit 1
+ fi
+fi
# Check to see if it really is or isn't GNU ld.
echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
else
with_gnu_ld=no
fi
-echo $ac_t "$with_gnu_ld" 1>&6
+echo "$ac_t$with_gnu_ld" 1>&6
# See if the linker supports building shared libraries.
echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
case "$host_os" in
aix3*)
allow_undefined_flag=unsupported
- archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '"'s/.* //'"' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE -lc$deplibs;$AR cru $lib $objdir/$soname'
+ archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '"'s/.* //'"' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE$deplibs;$AR cru $lib $objdir/$soname'
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
;;
irix5* | irix6*)
- archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
+ archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
;;
hardcode_shlibpath_var=no
;;
- osf3* | osf4*)
+ osf3*)
allow_undefined_flag=' -expect_unresolved'
- archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
+ archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4*)
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
hardcode_shlibpath_var=no
;;
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ ;;
+
*)
ld_shlibs=no
can_build_shared=no
;;
esac
fi
-echo $ac_t "$ld_shlibs" 1>&6
+echo "$ac_t$ld_shlibs" 1>&6
if test -z "$NM"; then
echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
/*) ;; # Let the user override the test with a path.
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb:$PATH:/bin; do
+ for ac_dir in /usr/ucb $PATH /bin; do
test -z "$ac_dir" && dir=.
if test -f $ac_dir/nm; then
# Check to see if the nm accepts a BSD-compat flag.
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \1'
+symxfrm='\1%\1'
# Define system-specific variables.
case "$host_os" in
# If we're using GNU nm, then use its standard symbol codes.
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- symcode='[ABCDGISTU]'
+ symcode='[ABCDGISTUW]'
fi
-# Delete symbols that are not valid C identifiers.
-global_symbol_pipe="sed -e '/^.* $symcode $sympat$/!d'"
-
# Write the raw and C identifiers.
-global_symbol_pipe="$global_symbol_pipe -e 's/^.* $symcode $sympat$/$symxfrm/'"
+global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
# Check to see that the pipe works correctly.
pipe_works=no
# We can only hardcode existing directories.
hardcode_action=relink
fi
-echo $ac_t "$hardcode_action" 1>&6
+echo "$ac_t$hardcode_action" 1>&6
test "$hardcode_action" = unsupported && can_build_shared=no
echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
# PORTME Some linker may need a different reload flag.
reload_flag='-r'
-echo $ac_t "$reload_flag"
+echo "$ac_t$reload_flag"
test -n "$reload_flag" && reload_flag=" $reload_flag"
# PORTME Fill in your ld.so characteristics
shlibpath_var=LD_LIBRARY_PATH
;;
+uts4*)
+ version_type=linux
+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
+ soname_spec='$libname.so.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
*)
dynamic_linker=no
;;
esac
-echo "$ac_t""$dynamic_linker"
+echo "$ac_t$dynamic_linker"
test "$dynamic_linker" = no && can_build_shared=no
# FIXME need to add library stripping features
#echo $ac_n "checking for static library strip program... $ac_c" 1>&6
#if test -n "$old_striplib"; then
-# echo $ac_t "$old_striplib" 1>&6
+# echo "$ac_t$old_striplib" 1>&6
#else
-# echo $ac_t none 1>&6
+# echo "$ac_t"none 1>&6
#fi
#if test "$can_build_shared" = yes; then
# echo $ac_n "checking for shared library strip program... $ac_c" 1>&6
#
# if test -n "$striplib"; then
-# echo $ac_t "$striplib" 1>&6
+# echo "$ac_t$striplib" 1>&6
# else
-# echo $ac_t none 1>&6
+# echo "$ac_t"none 1>&6
# fi
#fi
;;
esac
-echo "$ac_t""$enable_shared" 1>&6
+echo "$ac_t$enable_shared" 1>&6
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
link_static_flag no_builtin_flag export_dynamic_flag_spec \
profile_flag_pattern library_names_spec soname_spec RANLIB \
old_archive_cmds old_postinstall_cmds archive_cmds postinstall_cmds \
- allow_undefined_flag finish_cmds global_symbol_pipe striplib old_striplib \
+ allow_undefined_flag finish_cmds global_symbol_pipe \
+ striplib old_striplib \
hardcode_libdir_flag_spec hardcode_libdir_separator; do
eval "$var=\`echo \"\$$var\" | sed \"\$sed_quote_subst\"\`"
# The version of $progname that generated this script.
LTCONFIG_VERSION="$VERSION"
+# Shell to use when invoking shell scripts.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
# Whether or not to build libtool libraries.
build_libtool_libs=$enable_shared
# Commands used to finish a libtool library installation in a directory.
finish_cmds="$finish_cmds"
-# Take the output of nm and produce a listing of raw symbols and C names
+# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe="$global_symbol_pipe"
# How to strip a library file.
exit 1
fi
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "${COLLECT_NAMES+set}" != set; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+
# Global variables.
mode=$default_mode
nonopt=
# Infer the operation mode.
if test -z "$mode"; then
case "$nonopt" in
- *cc)
+ *cc | *++)
mode=link
for arg
do
exit 1
fi
+ # Add libc to deplibs on all systems.
+ deplibs="$deplibs -lc"
+
if test -n "$dlfiles$dlprefiles"; then
$echo "$progname: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2
# Nullify the symbol file.
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
+ if test "$export_dynamic" = yes; then
# Add our own program objects to the preloaded list.
dlprefiles=`$echo "$objs$dlprefiles " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
# Discover the nlist of each of the dlfiles.
- dlsyms="$objdir/${output}S.c"
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms="${output}S.c"
+ else
+ NM=
+ global_symbol_pipe=
+ dlsyms=
+ fi
+
nlist="$objdir/${output}.nm"
- $run rm -f "$nlist" "$nlist"T
+ if test -d $objdir; then
+ $show "rm -f $nlist ${nlist}T"
+ $run rm -f "$nlist" "${nlist}T"
+ else
+ $show "$mkdir $objdir"
+ $run $mkdir $objdir || exit $?
+ fi
+
for arg in $dlprefiles; do
- $echo "extracting global symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ if test -n "$NM"; then
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ fi
done
- # Parse the name list into a C file.
- $echo "creating $dlsyms"
+ # Parse the name list into a source file.
+ $show "creating $objdir/$dlsyms"
if test -z "$run"; then
+ # Make sure we at least have an empty file.
+ test -f "$nlist" || : > "$nlist"
+
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
wcout=`wc "$nlist" 2>/dev/null`
count=`$echo "$wcout" | sed 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
- test "$wcout" = "$count" && count=-1
+ (test "$count" -ge 0) 2>/dev/null || count=-1
else
rm -f "$nlist"T
count=-1
fi
- cat <<EOF > "$dlsyms"
+ case "$dlsyms" in
+ "") ;;
+ *.c)
+ cat <<EOF > "$objdir/$dlsyms"
/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
-/* Prevent the only kind of circular reference mistakes we can make. */
+/* Prevent the only kind of declaration conflicts we can make. */
#define dld_preloaded_symbol_count some_other_symbol
#define dld_preloaded_symbols some_other_symbol
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* External symbol declarations for the compiler. */
EOF
- if test -f "$nlist"; then
- sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$dlsyms"
- else
- $echo "/* NONE */" >> "$dlsyms"
- fi
+ if test -f "$nlist"; then
+ sed -e 's/^.*%\(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
+ else
+ $echo '/* NONE */' >> "$objdir/$dlsyms"
+EOF
+ fi
- cat <<EOF >> "$dlsyms"
+ cat <<EOF >> "$objdir/$dlsyms"
#undef dld_preloaded_symbol_count
#undef dld_preloaded_symbols
{
EOF
- if test -f "$nlist"; then
- sed 's/^\(.*\) \(.*\)$/ {"\1", \&\2},/' < "$nlist" >> "$dlsyms"
- fi
+ if test -f "$nlist"; then
+ sed 's/^\(.*\)%\(.*\)$/ {"\1", \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
+ fi
- cat <<\EOF >> "$dlsyms"
+ cat <<\EOF >> "$objdir/$dlsyms"
{0},
};
+
+#ifdef __cplusplus
+}
+#endif
EOF
+ ;;
+
+ *)
+ echo "$progname: unknown suffix for \`$dlsyms'" 1>&2
+ exit 1
+ ;;
+ esac
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 $?
+ $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")"
+ $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $?
# Transform the symbol file into the correct name.
compile_command=`$echo "$compile_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`
$run eval "$compile_command" || exit $?
# Now create the wrapper script.
- $echo "creating $output"
+ $show "creating $output"
# Quote the finalize command for shipping.
finalize_command=`$echo "$finalize_command" | sed "$sed_quote_subst"`
thisdir=\`\$echo "\$file" | sed 's%/[^/]*$%%'\`
test "x\$thisdir" = "x\$file" && thisdir=.
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld "\$file" | sed -n 's/.*-> //p'\`
+ while test -n "\$file"; do
+ destdir=\`\$echo "\$file" | sed 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test "x\$destdir" != "x\$file"; then
+ case "\$destdir" in
+ /*) thisdir="\$destdir" ;;
+ *) thisdir="\$thisdir/\$destdir" ;;
+ esac
+ fi
+
+ file=\`\$echo "\$file" | sed 's%^.*/%%'\`
+ file=\`ls -ld "\$thisdir/\$file" | sed -n 's/.*-> //p'\`
+ done
+
# Try to get the absolute directory name.
absdir=\`cd "\$thisdir" && pwd\`
test -n "\$absdir" && thisdir="\$absdir"
progdir="\$thisdir/$objdir"
program='$output'
- # If the \$file dir failed (maybe due to symlink), try a hardcoded dir.
- oprogdir="\$progdir"
- if test -f "\$progdir/\$program"; then :
- else
- thisdir='`pwd`'
- progdir="\$thisdir/$objdir"
- fi
-
if test -f "\$progdir/\$program"; then
EOF
fi
else
# The program doesn't exist.
- \$echo "\$0: error: neither \$oprogdir/\$program nor \$progdir/\$program exists" 1>&2
+ \$echo "\$0: error: \$progdir/\$program does not exist" 1>&2
\$echo "This script is just a wrapper for \$program." 1>&2
\$echo "See the $PACKAGE documentation for more information." 1>&2
exit 1
old_library=
test "$build_old_libs" = yes && old_library="$libname.a"
- $echo "creating $output"
+ $show "creating $output"
# Only create the output if not a dry run.
if test -z "$run"; then
install)
progname="$progname: install"
- # The first argument is the name of the installation program.
+ # There may be an optional /bin/sh argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL"; then
+ # Aesthetically quote it.
+ arg=`$echo "$nonopt" | sed "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$arg "
+ arg="$1"
+ shift
+ else
+ install_prog=
+ arg="$nonopt"
+ fi
+
+ # The real first argument should be the name of the installation program.
# Aesthetically quote it.
- arg=`$echo "$nonopt" | sed "$sed_quote_subst"`
+ arg=`$echo "$arg" | sed "$sed_quote_subst"`
case "$arg" in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
esac
- install_prog="$arg"
+ install_prog="$install_prog$arg"
# We need to accept at least all the BSD install flags.
dest=
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec $0 --finish$current_libdirs
+ exec $SHELL $0 --finish$current_libdirs
exit 1
fi
+Tue Oct 7 10:48:37 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * hardcode.test (hardcode_libdir_flag_spec): Check the hardcoding
+ properties of the flag_spec, too.
+
+Sun Sep 21 13:17:00 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * defs, Makefile.am (clean-local): Change =inst to _inst to fix
+ portability on MS-DOS. From Robert Hoehne.
+
Mon Sep 15 07:14:37 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
* hardcode.test (objdir): New variable to simplify change from
# We need to remove any files that the above tests created.
clean-local:
-test -f ../demo/Makefile && cd ../demo && $(MAKE) distclean
- rm -rf =inst
+ rm -rf _inst
libtool="$srcdir/tlibtool"
make="${MAKE-make}"
-prefix="./=inst"
+prefix="./_inst"
if test "$need_prefix" = yes; then
# An absolute path to a test installation directory.
test -d $prefix || mkdir $prefix
hardcode_direct=NONE
hardcode_minus_L=NONE
hardcode_shlibpath_var=NONE
+hardcode_libdir_flag_spec=NONE
# Suck in all the hardcode_* variable settings.
eval `egrep -e '^hardcode_' ./libtool 2>/dev/null`
status=1
fi
+if test "$hardcode_libdir_flag_spec" = NONE; then
+ echo "hardcode_libdir_flag_spec not set in ../demo/libtool" 1>&2
+ status=1
+fi
+
test $status -eq 0 || exit $status
echo "= Searching for hardcoded library directories in each program"
hc-direct) expected="$hardcode_direct" ;;
hc-libpath) expected="$hardcode_shlibpath_var" ;;
hc-minusL) expected="$hardcode_minus_L" ;;
+
+ hc-libflag)
+ if test -n "$hardcode_libdir_flag_spec"; then
+ expected=yes
+ else
+ expected=unsupported
+ fi
+ ;;
+
*)
continue
;;
# AIX fgrep also has a limited line length, that's why we finally
# turn the NUL characters into newlines.
hardcoded=yes
- elif egrep 'unsupported' $file > /dev/null; then
+ elif (sed -e '1!d' $file | egrep 'unsupported') >/dev/null 2>&1; then
hardcoded=unsupported
fi